Composite Nodes¶
Composites define a subtree and the base rule of when this subtree should be executed.
Conditional¶
Perform if … else … logic.
If the subtree of a conditional returns Success then the success subtree is executed.
If the subtree of a conditional returns Fail then the failure subtree is executed.
Sequence¶
Nodes in the subtree are executed in order, first child-1, then child-2 and so on. Execution of the subtree stops when a child node fails or when all children nodes succeed.
In case of failure the Sequence node returns a Failure state. In case of all children succeeding the Sequence returns a Success or Running state.
The randomize option makes it possible to pick children in the subtree in random order.
Randomize: test output sockets in a random order.
Selector¶
Nodes in the subtree are executed in order, first child-1, then child-2 and so on. Execution of the subtree stops when a child succeeds or when all children fail.
In case of failure the Selector node returns a Failure state. In case a child succeeds the Selector returns a Success or Running state.
The randomize option makes it possible to pick children in the subtree in random order.
Randomize: test output sockets in a random order.
Parallel¶
Nodes in the subtree are executed in parallel. Execution of the subtree stops when a child node fails or when all children nodes succeed.
In case of failure the Parallel node returns a Failure state. In case all children succeed the Parallel returns a Success state.
Branch State Property¶
Branch of to different branches based on the content of a state property.
This node can reduce the complexity of your node tree when your using multiple Conditional to check the state of a property and based on the state execute a branch of the node tree.
For each value an output socket can be added. When the state property of an agent matches the entered value the connected branch will be executed. It can be compared to a switch..case or if..elif statements.
State: the state property to check
It supports String, Integer, Boolean and Countdown state properties.
Note
Float properties might work, but isn’t reliable due to being a floating point.