Wait
The Wait node allows the behavior tree to pause its execution for a specific amount of time. This is useful when you need to introduce a delay between different actions or wait for a particular event.
Examples of use:
- Waiting before using the next skill in rotation.
- Delay before checking the state of a game object.
How it works:
- When the Wait node is reached during the tree execution, it enters the
Runningstate for the specified time, effectively pausing the tree execution - no other nodes can do anything until Wait returnsSuccess. - After the waiting time elapses, the node returns
Success, and the tree continues execution.
Tree example:

In this example, after casting a skill, the tree pauses at the Wait node for 5 seconds before using a basic attack. For instance, this can be used to wait for an animation to finish or for some event to occur in the game world.
It is not recommended to use excessively long delays as it can reduce the effectiveness of the behavior tree. During the node's action, no other actions/nodes will work. In most situations, you can avoid using Wait by replacing this node with others, such as Cooldown