GotoState - All Scripts
From Creation Kit
Member of: Any and all scripts.
Sets this object's current state, issuing OnBeginState and OnEndState events as necessary.
Contents |
Syntax
Function GotoState(string asNewState)
Parameters
- asNewState: The state to go to. Subsequent calls to GetState will return this string exactly as passed in. The state name is not case-sensitive with the state blocks in script.
Return Value
None.
Examples
; Set this object as being in the "Running" state GotoState("Running")
Notes
GotoState doesn't return until the OnEndState event of the current state and the OnBeginState event of the new state finish running. (And the events won't overlap)

