States can have incoming and outgoing transitions. Only one state can be active in the FSM at any given time.
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 also 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 Super Action State gives finer control for when to execute actions providing a different actions list for OnEnter, OnUpdate, and OnExit respectively. Do note that this state will never finish on its own if there are actions in the OnUpdate list.
Utility nodes are not states and thus can have no incoming transitions. They instead do something in parallel / at the same time with the FSM.
The Any State node is used to transition from Any State to any other state based on the conditions assigned to its transitions. 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 Any State from transitioning to a state that is already active.
These are considered states as normal but are in a separate category for clarity.
The Sub Behaviour Tree state is assigned another whole Behaviour Tree. On Enter, the sub Behaviour Tree will be executed either once or repeat based on the chosen setting in the inspector. If set to Once this state will finish as soon as one Behaviour Tree cycle is done. if set to Repeat this state will never finish by itself.
You can optionally specify two events to be sent, one for when the sub Behaviour Tree’s root node returns Success and another for when it returns Failure. As soon as either happens, the corresponding event will be sent to this FSM, which you can make use of using the Check Event condition on this state transitions. Remember that you can also use SubGraph Variables Mapping as with all SubGraph nodes in NodeCanvas to map the subgraph local variables to its parent graph variables.
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.
The Sub FSM state is assigned another whole FSM. On Enter, the sub FSM will execute. This State will be finished when and if the sub FSM is finished.
Remember that you can also use SubGraph Variables Mapping as with all SubGraph nodes in NodeCanvas to map the subgraph local variables to its parent graph variables.
The Sub Dialogue state is assigned another whole Dialogue Tree. On Enter the sub Dialogue will execute. This state will be finished when the Sub Dialogue is finished.
You can optionally specify two events to be sent, one for when the sub Dialogue finish in Success and another for when it finishes in Failure. As soon as either happens, the corresponding event will be sent to this FSM, which you can make use of using the Check Event condition on this state transitions. Remember that you can also use SubGraph Variables Mapping as with all SubGraph nodes in NodeCanvas to map the subgraph local variables to its parent graph variables.
© Paradox Notion 2014-2024. All rights reserved.