CallScript(scr as ScriptRef, func as String, data as NodeRef) as Boolean
- The script being called.
- The function being called within the script
- A node reference referring to the target node that holds the data to be passed
This function calls the specified script and function, passing the NodeRef as the function's sole parameter. The function call is handled by a new HeroMachine (HSL's Virtual Machine), while HeroEngine maintains a cache of instantiated HeroMachines to service calls of this type it imposes a not insignificant additional processing load vs a standard function call.
This is different than a normal call to a script's function, because if the called function throws a script error, Call Script will return FALSE and the calling script will continue execution. If no script error is thrown, Call Script will return TRUE.