Common Behaviors
Solve a gameplay goal
Common Behaviors show how several tasks work together to solve a recognizable AI problem. Each page pairs an editor screenshot with a nontechnical explanation of the tree structure, branch order, interruption, and task statuses. When runtime behavior is important, the How it runs section explains the relevant state changes alongside the scenario instead of separating them into another reference section.
Choose a scenario
- Wander for a Limited Time runs movement and a time limit together.
- Patrol and Chase an Enemy switches between patrol and pursuit when perception changes.
- Retry with Delay waits before trying a failed branch again.
- Timeout stops work that takes too long.
- Attack with Cooldown limits how often an attack branch can run.
- React to an Event interrupts normal behavior when an event arrives.
- Search After Losing a Target transitions from pursuit to searching and then patrol.
- Flee at Low Health gives survival behavior priority over combat and patrol.
- Fallback Strategies tries alternatives in a deliberate order.
- Switch Subtrees selects reusable behavior assets for different agent roles.
- Choose the Highest-Priority Need compares changing needs before selecting a branch.
Adapt each tree
Each example uses descriptive task names so you can adapt the structure to your own movement, combat, perception, and animation tasks. The example tasks themselves do not need to match a particular controller implementation.