OnBeginState

From the CreationKit Wiki
Revision as of 14:13, 12 September 2016 by imported>Antares (Was curious if multiple GoToState calls would send multiple events if they were all for the same state. Seems like they do. Updated the page with this info)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: Any and all scripts.

Event called when the state the event is in has just been switched to. Note that this event will not be called for an auto state when the object is initialized.

This event will be called if the object it sent to a state that is not defined, including states that cannot be defined such as those with invalid names (e.g. "State #3" or "").

This event will also be called by any subsequent GoToState() calls even if the script is already in that state.

Syntax[edit | edit source]

Event OnBeginState()

Parameters[edit | edit source]

None

Example[edit | edit source]

State Running
  Event OnBeginState()
    Debug.Trace("Entered the running state!")
  EndEvent
EndState

See Also[edit | edit source]

OnEndState