ScriptState::GetInitiatorNode
Defined in:
Returns the initiator node for a script.
C4Scripts.h
Prototype
Node *GetInitiatorNode(void) const;
Description
The GetInitiatorNode
function returns the node that originally caused the particular script instance represented by a ScriptState
object to run. If a trigger caused the script to run, then the initiator node is the node that interacted with the trigger, activating it or deactivating it. If the script was started by direct activation through another script, then the initiator node is the node that caused that other script to run. The initiator node can be nullptr
.Note that if a particular method targets the trigger node, then it will be returned by the
Method::GetTargetNode
function.
See Also