BT Composite

The tree part of it all

A Composite node is a branch in the behavior tree so it can have more then one child node. How it runs the child behaviors and how the return values are handled depends on the type of composite node.

Sequence
Run each child in sequence until all of the children has run successfully or until one of the children fail. It returns success if all the children execute successfully.

Selector (a.k.a Priority)
Run all children in order until the first is found that ends in success. If so this node returns success and if all children fails this node returns failure.

Parallel (a.k.a Concurrent)
All the children in the parallel node is run at the same time. Then one can have a option to select when this node fail or succeeds. For example the choice for this node to fail if all children fail or only one. One use for this node is to keep doing a action (ex CloseInOnTarget) while a condition (NoLookingAtMe) is true.



Comments