Learn how to use NodeCanvas

Download PDF Version

State Machines


Every node but a few of the FSM is a State. A State will do some action as soon as it is Entered, while it is Running and as soon as it is Exited. States can have Transitions to other States. Transitions are condition based and as such when a Transition’s Condition is true, the Transition will take place. When a Transition takes place the current State will Exit and the new one will Enter. When a State’s job is done, it will check for any Transition without a Condition. If one exists, the Transition will take place.


Every node of an FSM (except the Concurrent State) can have Transitions. A Transition holds a Condition Task. While a State is active, all of its Transitions are checked. If any of them is true, the Transition will take place and the current State will Exit while the target state will Enter and become current. A Transition without a condition will take place as soon as the parent State is finished. Notice that while you can have many Transitions without a Condition, only the first one will take place.

You can prioritize the order in which the transitions will be checked through the State’s Inspector.

FSM’s in NodeCanvas are Conditional based instead of event based like some other tools are. This also allows them to check for Events as well thus making them very flexible.

Further Reading

Here are some interesting links on the net regarding State Machines:

Yes No Suggest edit
4 of 6 users found this section helpful
Suggest Edit