Difference between revisions of "CallFunction - ScriptObject"

Jump to navigation Jump to search
120 bytes added ,  05:15, 30 August 2023
Updated Notes regarding parameters
imported>Plplecuyer
 
(Updated Notes regarding parameters)
 
Line 41: Line 41:


== Notes ==
== Notes ==
*If the function name don't exist, the function will error. You may want to check for the existence of the mod you want to talk to before using this.
*If the function name doesn't exist, the function will error. You may want to check for the existence of the mod you want to talk to before using this.
*The parameter types must match ''exactly''. You cannot insert a float into the param array if the function expects an int, or a Actor if the function expects an ObjectReference. Normally the compiler would do these casts for you in a normal function call, but it doesn't know what the parameters are, so it is your responsibility to match them up.
*The parameter types must match ''exactly''. You cannot insert a float into the param array if the function expects an int, or a Actor if the function expects an ObjectReference. Normally the compiler would do these casts for you in a normal function call, but it doesn't know what the parameters are, so it is your responsibility to match them up.
*Optional parameters (i.e. parameters with default values in the function declaration) must be supplied with a value.
*The compiler cannot check the function name or parameters for you, so make sure to triple check everything!
*The compiler cannot check the function name or parameters for you, so make sure to triple check everything!


14

edits

Navigation menu