Goal

Use this pattern when an attack should complete once, then keep the branch active for a fixed delay before it may repeat.

Tree structure

Place Attack beneath Cooldown and set its Duration. Put the Cooldown branch where the parent should wait for both the attack and its recovery interval.

A Cooldown decorator runs Attack and holds its result until the cooldown duration expires.

How it runs

Attack runs and returns Success or Failure. Cooldown stores that result, keeps returning Running for its configured duration, and leaves Attack inactive. When the duration ends, Cooldown returns the stored result to its parent.

This is the original Behavior Designer Cooldown behavior: fallback siblings do not run during the delay because the Cooldown branch is still Running.

Variations

If a Selector must choose movement or defense between attacks, use a separate time-based Conditional before Attack. Store the next allowed attack time outside the task’s transient execution state, fail the condition until that time, and update it when the attack starts. Classic Cooldown has only Duration; it does not have a Wait For Cooldown toggle or an optional failure gate. A Parallel branch can run independent behavior during the post-attack wait.

Tasks used in this tree

Cooldown and a project-specific Attack from Actions.