The Action State node itself holds an Action List. On Enter, the assigned actions will execute either in parallel or in order one after the other. This can be set in the inspector. The State is considered finished as soon as all actions are finished if at all. In Play mode, the running actions will also be marked with a play icon in front of them.
You can select whether or not you want the listed actions to Repeat themselves by checking the “Repeat State Actions” options. Doing this will naturally make the state unable to finish and will rather keep running forever.
You can also set if you want the listed actions to Run In Sequence or Run In Parallel by the relevant GUI control underneath the action list as usual.
The Any State node is used to transition from Any State to any other state based on a Condition. It can have any number of Transitions that are constantly checked. If any Transition Condition becomes true, the current state of the FSM (whatever that is) will Exit and the target one of the Any State transition will Enter.
You can also mark “Don’t Re-Trigger Active States”, to prevent the Any State from transitioning to a state that is already active.
The On FSM Enter node holds a list of actions, as well as a list of optional pre-conditions required. The action here will execute as soon as the FSM starts if the conditions are met.
The On FSM Exit node holds a list of actions, as well as a list of optional pre-conditions required. The action here will execute as soon as the FSM stops if the conditions are met.
The On FSM Update node holds a list of actions, as well as a list of optional pre-conditions required. The action here will execute in parallel with any other state, for as long as the FSM is running, if the conditions are met.
The Sub Behaviour Tree node is assigned a whole Behaviour Tree. On Enter, the Behaviour Tree will be executed either once or forever based on the chosen setting in the inspector. If set to Run Once this state will finish as soon as one Behaviour Tree cycle is done.
You can optionally specify two events to be sent, one for when the nested Behaviour Tree’s root node status returns Success and another for when it returns Failure. As soon as either happens, the event will be sent. Use the Check Event Condition on this node’s transitions to make use of that event.
Sub Behaviour Tree States, are very powerful since you can have the broad states at a top level of the behaviour and at each state go deeper to define the behaviour of the state using Behaviour Trees!
When this FSM is paused the Sub Behaviour Tree will also get paused if this node is the current FSM state.
The Sub FSM is assigned another entire FSM. On Enter, that FSM will execute. This State will be finished when and if the sub FSM is finished. Of course, if a Transition’s Condition is true, the Transition will take place and this state will Exit as normal. Thus by using Sub FSM nodes, you are able to create what is called Hierarchical State Machines.
When this FSM is paused the Sub FSM will also get paused if this node is the current FSM state.