Difference between revisions of "OnBeginState"
Jump to navigation
Jump to search
imported>Jlundin |
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) |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
'''Member of:''' Any and all scripts. | '''Member of:''' Any and all scripts. | ||
Event called when the state the event is in has just been switched to. Note that this | 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 == | == Syntax == |
Latest revision as of 13:13, 12 September 2016
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