Team Wilson Docs
  • PPG 3D
    • API
      • Main3D Function
      • Register
      • Action Events
      • Modify Property
      • Run Method
      • Add 3D Component
      • New Voxel Item
      • Categories
    • Voxels
      • Creating Your Own Voxel Model
      • Models
    • Snippets
      • Lean Monster Addon
    • Resources
  • RageBox
  • Character Creator
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. PPG 3D
  2. API

Run Method

Two functions are used to run functions of PPG 3D classes specifically.

RunMethod is used to run a function in a singular defined object It uses 4 parameters.

  1. Object - GameObject

  2. Class - string "className"

  3. Function - string "functionName"

  4. Parameters - object[]

Example:

GameObject.Find("Mod3DAPI").SendMessage("RunMethod", new object[]      
{
    Instance,
    "DPerson",
    "Die",
    new object[0] //creates an empty array. Look up a little to see how to create a proper array.
}, SendMessageOptions.DontRequireReceiver);

RunMethodsInChildren is used to run functions in the children and main object. It also uses 4 parameters.

  1. Parent - GameObject

  2. Class - string "className"

  3. Function - string "functionName"

  4. Parameters - object[]

Example:

GameObject.Find("Mod3DAPI").SendMessage("ModifyPropertiesInChildren", new object[]          
{
		Instance,
		"Limb3D",
		"BreakBone",
		new object[] { true } //breakbone has a bool to make it silent
}, SendMessageOptions.DontRequireReceiver);
PreviousModify PropertyNextAdd 3D Component

Last updated 1 year ago

Was this helpful?