Conditionals Are Not Leaf Nodes
In the standard model for behavior trees, conditionals are Task leaf nodes, which simply do not do anything other than succeed or fail. Although nothing prevents you from making traditional conditional tasks, it is highly recommended that you use our Decorator system for conditionals instead.
Making conditionals be decorators rather than tasks has a couple of significant advantages.
First, conditional decorators make the behavior tree UI more intuitive and easier to read. Since conditionals are at the root of the sub-tree they are controlling, you can immediately see what part of the tree is "closed off" if the conditionals are not met. Also, since all leaves are action tasks, it is easier to see what actual actions are being ordered by the tree. In a traditional model, conditionals would be among the leaves, so you would have to spend more time figuring out which leaves are conditionals and which leaves are actions.
In this section of a Behavior Tree, the Decorators Close Enough and Blackboard can prevent the execution of the Sequence node's children.
Another advantage of conditional decorators is that it is easy to make those decorators act as observers (waiting for events) at critical nodes in the tree. This feature is critical to gaining full advantage from the event-driven nature of the trees.