Describe finite state machine.
Categories > Logic > rex_gfsmIntroductionLinksDependenceUsageFlow chartGo to next stateState changing actionsInitial stateDebug
None
Action:Request
, get and go to next state by event. Style of behavior tree.
Action:Request
, go to next state which determined by
Condition:On transfer logic(Curstate)
set next state by Action:Set next state
Action:Set next state
does not invoke.Action:Go to state
, go to next state directly.
Add actions under these conditions, which will be triggered when state is changed from Expression:PreState
to Expression:CurState
Condition:On state changed
If Condition:On transfer
is in event sheet,
Condition:On state changed
Else
If Condition:On exit
is in event sheet,
Condition:On exit
Condition:On default exit
If Condition:On enter
is in event sheet,
Condition:On enter
Condition:On default enter
DO NOT change state (Action:Request
or Action:Go to state
) under these conditions directly, or inserts a System action: wait (0)
above Action:Request
or Action:Go to state
, which could suspend remaining actions until next tick.
Set initial state in property Initial state
.
Dump current state by Expression:CurState
under Condition:On state changed
, to track the state changing.