Mod:Creation Kit/CallFunctionNoWait - ScriptObject

Member of: Mod:Creation Kit/ScriptObject Script

Calls a function on this script asynchronously. Script execution continues immediately without waiting for the function you called to finish (or even start).

Syntax
Function CallFunctionNoWait(string asFuncName, Var[] aParams) native

Parameters

 * asFuncName: The name of the function to call
 * aParams: The list of parameters to pass

Return Value
None

Examples
ScriptObject celebration = CelebrationForm.CastAs("FourthOfJuly") Var[] params = new Var[3] params[0] = 10 params[1] = 11.0 ; Note the '.0' to make this a float params[2] = RedBurst as Form ; Must cast as form by hand, even though explosion is derived from form celebration.CallFunctionNoWait("LaunchFirework", params) params[0] = 15 params[2] = BlueBurst as Form celebration.CallFunctionNoWait("LaunchFirework", params)
 * Call "Function LaunchFirework(int aHeight, float aTimer, Form aBaseObject)" on the "FourthOfJuly" script
 * We use CastAs to make sure we don't depend on the script we want to call the function on
 * Now we have two copies of LaunchFirework running in parallel with us, each with different parameters