class

BT

Node builders (composite / decorator / task vocabulary)

Module
AINavigation
Header
#include "AINavigation/BehaviorTree.h"
Namespace
Mowo

Type aliases

AliasDescription
using NodePtr = std::unique_ptr<BTNode>

Public functions

ReturnsNameDescription
NodePtrSelectorComposites
NodePtrSequencefirst non-Success child stops
NodePtrInverterDecorators (wrap one child)
NodePtrBlackboardBoolgate on a bb bool
NodePtrGateGeneric gate: condition decides, observedKeys name what can change it.
NodePtrTimeLimitFails the child (aborting it) once it has run longer than seconds.
NodePtrWaitTasks (leaves)
NodePtrFuncarbitrary leaf logic
NodePtrSetBlackboardBoolset + Success
NodePtrSetBlackboardIntset + Success
NodePtrParallelMore composites / decorators
NodePtrServicerun fn every interval while child active
NodePtrCooldownblock (Failure) for seconds after each completion
NodePtrLooprepeat child count times (0 = forever, yields each iter)
NodePtrMoveToNav task: drive the AIController's possessed pawn's NavAgentComponent toward the Vec3 in blackboard destKey.
NodePtrFindCoverCover tasks (implemented in CoverSystem.cpp, backed by FCoverSystem).
NodePtrMoveToCover
NodePtrInCover
NodePtrLeaveCover
NodePtrMeleeAttackMelee task (implemented in MeleeSystem.cpp, backed by FMeleeSystem).

Function details

Selector

C++
static NodePtr Selector(std::vector<NodePtr> children)

Composites

Sequence

C++
static NodePtr Sequence(std::vector<NodePtr> children)

first non-Success child stops

Inverter

C++
static NodePtr Inverter(NodePtr child)

Decorators (wrap one child)

BlackboardBool

C++
static NodePtr BlackboardBool(FName key, bool expected, NodePtr child, EBTFlowAbortMode abortMode = EBTFlowAbortMode::None)

gate on a bb bool

Gate

C++
static NodePtr Gate(std::function<bool(BTContext&)> condition, std::vector<FName> observedKeys, NodePtr child, EBTFlowAbortMode abortMode = EBTFlowAbortMode::None)

Generic gate: condition decides, observedKeys name what can change it.

TimeLimit

C++
static NodePtr TimeLimit(float seconds, NodePtr child)

Fails the child (aborting it) once it has run longer than seconds.

Wait

C++
static NodePtr Wait(float seconds)

Tasks (leaves)

Func

C++
static NodePtr Func(std::function<EBTStatus(BTContext&)> fn)

arbitrary leaf logic

SetBlackboardBool

C++
static NodePtr SetBlackboardBool(FName key, bool value)

set + Success

SetBlackboardInt

C++
static NodePtr SetBlackboardInt(FName key, int value)

set + Success

Parallel

C++
static NodePtr Parallel(NodePtr main, std::vector<NodePtr> background)

More composites / decorators

Service

C++
static NodePtr Service(float interval, std::function<void(BTContext&)> fn, NodePtr child)

run fn every interval while child active

Cooldown

C++
static NodePtr Cooldown(float seconds, NodePtr child)

block (Failure) for seconds after each completion

Loop

C++
static NodePtr Loop(int count, NodePtr child)

repeat child count times (0 = forever, yields each iter)

MoveTo

C++
static NodePtr MoveTo(FName destKey, float acceptance = 0.0f)

Nav task: drive the AIController's possessed pawn's NavAgentComponent toward the Vec3 in blackboard destKey. Running until within acceptance (or the agent reports arrived), then Success; Failure if there's no pawn/agent. acceptance <= 0 uses the agent's stoppingDistance.

FindCover

C++
static NodePtr FindCover(FName threatKey, float maxDistance = 25.0f)

Cover tasks (implemented in CoverSystem.cpp, backed by FCoverSystem). FindCover reads the threat position from threatKey, reserves the best point and writes its position to "CoverPosition" + id to "CoverPointId". MoveToCover drives the NavAgent toward the reserved point. InCover is a condition: reserved + not flanked + within acceptance. LeaveCover releases the reservation.

MoveToCover

C++
static NodePtr MoveToCover(float acceptance = 0.75f)

InCover

C++
static NodePtr InCover(float acceptance = 1.0f)

LeaveCover

C++
static NodePtr LeaveCover()

MeleeAttack

C++
static NodePtr MeleeAttack(FName targetKey, float range = 0.0f, float cooldown = 0.0f)

Melee task (implemented in MeleeSystem.cpp, backed by FMeleeSystem). Reads the target actor from blackboard targetKey, fails when it is missing or beyond range (0 = the equipped weapon's range), otherwise faces it, requests an attack and stays Running until the swing resolves, then Success. After a completed swing the node reports Failure for cooldown seconds.

Generated from AINavigation/BehaviorTree.h via ainavigation.json · Oct 27, 2026Version 1.0.0