Caveats
CK Wiki - Notes
- GotoState doesn't return until the OnEndState - ScriptObject event of the current state and the OnBeginState - ScriptObject event of the new state finish running. (And the events won't overlap)
- If you call GotoState, and the script is already in the specified state, the OnEndState - ScriptObject and OnBeginState - ScriptObject events will still fire.
Parameters
stringasNewState
CK Wiki Description
The state to go to. Subsequent calls to GetState will return this string exactly as passed in. The state name is not case-sensitive.
Examples
; Set this object as being in the "Running" state
GotoState("Running")Auto-Generated Example
string myString__asNewState
myScriptObject__toCallFunctionOn.GotoState(myString__asNewState)Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
