BTCondition

Inherits: BTTask < BT

Inherited By: BTCheckAgentProperty, BTCheckTrigger, BTCheckVar

Base class for BT conditions.

Description

Base class for all BehaviorTree conditions. You can create your own conditions by extending the BTCondition class.

Condition is a task within a BehaviorTree that checks for a specific condition before executing subsequent tasks. It is often used inside composite tasks to control the execution flow. Conditions are used to verify the state of the environment, check for the presence of an enemy, or evaluate the health status of the agent. The use of condition tasks in a BehaviorTree can improve system efficiency and prevent unnecessary actions. However, they may not be suitable for complex decision-making processes, and too many condition tasks can make the BehaviorTree difficult to read.

Conditions typically don’t take multiple ticks to finish and return either SUCCESS or FAILURE immediately.