Using Composite nodes – Selectors, Sequences, and Simple Parallel

Composite nodes form tree nodes inside the Behavior Tree, and contain more than one thing to execute within them. There are three types of Composite nodes:

  • Selectors: Go through children from left to right looking for a successful node. If a node fails, it tries the next one. When successful, the node is completed and we can go back up the tree.
  • Sequence: Execute from left to right, until a node fails. If the node is successful, do the next one. If the node fails, go back up the tree.
  • Simple Parallel: Single task (purple) in parallel with some subtree (gray).

Getting ready

Using composite nodes is fairly straightforward. You only need a Behavior Tree to get started with them.

How to do ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.