The Deathmatch AI Kit organizes combat decisions as high-to-low-priority branches. Conditional aborts let an urgent branch, such as grenade evasion or taking damage, interrupt lower-priority searching and cover behavior.

Review the original Behavior Designer documentation first if Selectors, task status, conditional aborts, External Behavior Trees, or shared variables are unfamiliar.

Tree structure

The kit stores its graphs as External Behavior Trees. The character receives either the Solo or Team root at runtime, and Behavior Tree Reference tasks load shared combat subtrees. This keeps common branches in one asset instead of duplicating them between both roots.

  • Solo Tree explains initialization, repetition, branch priority, and the independent-agent root.
  • Team Tree adds backup requests, backup responses, and formation-based searching.

The Solo tree is a subset of the Team tree, so read it first even when the project uses teams.

Branches by priority

The main Selector evaluates these branches from left to right:

  1. Near Grenade interrupts the current behavior to evade an immediate explosive threat.
  2. Damaged either flees from the attacker or records the attacker’s position for a target search. Health seeking is a separate branch.
  3. Can See Target selects a weapon and runs the Attack subtree.
  4. Search for Health retrieves health when the configured condition is met.
  5. Can Hear Target records a sound position and begins a search.
  6. Search for Lost Target moves to the last known position and searches for a limited time.
  7. Is Ammo Low retrieves ammunition when required.
  8. Cover takes or changes cover while waiting for a target.
  9. Search for Target patrols when no higher-priority need exists.

A branch further left can interrupt eligible branches to its right. When changing their order, review the conditional abort mode and every shared variable the moved branch reads or resets.

Customize safely

  1. Duplicate the Solo or Team External Behavior Tree and any subtree you plan to change.
  2. Assign the duplicated root to a test agent.
  3. Change one branch at a time and watch task status in Play Mode.
  4. Test the branch’s Success and Failure paths plus every higher-priority interruption.
  5. Verify respawn, because the root Reset task clears its explicitly configured combat references and flags before the repeated combat loop starts again; it does not restore every shared variable.

Keep shared subtrees shared when both Solo and Team agents should receive the change. Duplicate a subtree only when the two agent types intentionally need different behavior.