GetState - All Scripts

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Any and all scripts.

Obtains the current state of the script, as a string.

Syntax[edit | edit source]

string Function GetState()

Parameters[edit | edit source]

None

Return Value[edit | edit source]

The script's current state, as it was last set by a GotoState call.

Examples[edit | edit source]

; Is this object currently in the "Running" state?
if (GetState() == "Running") ; case-sensitive!
  Debug.Trace("We are currently in the running state")
endIf

Notes[edit | edit source]

  • This is a latent function and is not executed asynchronously.
  • When used inside a SkyUI "state option" event, the name of the state option's state is returned.

See Also[edit | edit source]