C4 Engine
C4 Engine API Documentation

class ScriptState

Defined in:  C4Scripts.h
The ScriptState class represents the state of a running script.

class ScriptState : public ListElement<ScriptState>, public Packable, public Memory<ScriptState>

Member Functions
ScriptState::GetTriggerNode Returns the trigger node for a script.
ScriptState::GetInitiatorNode Returns the initiator node for a script.
ScriptState::GetScriptTime Returns the time elapsed since a script began running.
ScriptState::GetValue Returns a script variable.

ScriptState(ScriptController *controller);

controller The script controller that owns the script.
The ScriptState class represents the current state of a running script. A ScriptState object is passed to the Method::ExecuteMethod and Method::ResumeMethod functions so that the implementations of those functions can pass them to other functions that require the script state.
Base Classes
ListElement<ScriptState> Used internally by a script.
Packable Script state can be packed for storage in resources.
Memory<ScriptState> Script state objects are stored in a dedicated heap.
See Also