Call Script

From HEWIKI
Jump to: navigation, search

CallScript(scr as ScriptRef, func as String, data as NodeRef) as Boolean

Arguments

<scr> 
The script being called.
<func> 
The function being called within the script
<data> 
A node reference referring to the target node that holds the data to be passed


Description

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.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox