- Found in:
- Vanilla
eventOnBeginState(stringasOldState)
Description
Wiki Description
Event called when the state the event is in has just been switched to. Note that this block will NOT be called for an auto state when the object is initialized.
Documentation Comment
Event called after the script's state changes - passing in the old state
Not called on auto states when the script is first initialized
Parameters
stringasOldState
CK Wiki Description
The state that the script was in before it switched to the current one
Examples
State Running
Event OnBeginState(string asOldState)
Debug.Trace("Entered the running state from the " + asOldState + " state!")
EndEvent
EndStateAuto-Generated Example
Scriptname MyCoolScript extends ScriptObject
event OnBeginState(string asOldState)
Debug.trace("Event received - OnBeginState: asOldState = " + asOldState)
endEvent