state_exit()
The
state_exit event occurs whenever the
state command is used to transition to another state. It is handled before the new state's
state_entry event.
This event is
not invoked upon changing to the same state.
Compare with
state_entry.
Events