Tools
EditBehaviorTree
Create and modify AI behavior trees
The EditBehaviorTree tool creates and edits Behavior Trees and Blackboards for AI characters.
Capabilities
Composite Nodes
Add structural nodes:
- Selector: Tries children until one succeeds
- Sequence: Runs children in order until one fails
- Simple Parallel: Runs main task and background tree
Add a Selector node at the root
Add a Sequence under the Selector for combat behavior
Add a Sequence under the Selector for patrol behaviorTask Nodes
Add executable tasks:
Add MoveTo task targeting BlackboardKey TargetLocation
Add Wait task with WaitTime 2.0
Add PlayAnimation task
Add MakeNoise task
Add RotateToFaceBBEntry taskDecorators
Add conditions and modifiers:
Add Blackboard decorator checking IsPlayerVisible
Add Cooldown decorator with CooldownTime 5.0
Add Loop decorator with NumLoops 3
Add TimeLimit decorator with TimeLimit 10.0
Add ConditionalLoop decoratorServices
Add background behaviors:
Add DefaultFocus service
Add RunEQS service for environment queriesBlackboard Management
Create Keys
Add Bool key IsPlayerVisible
Add Vector key TargetLocation
Add Object key TargetActor of class Actor
Add Float key LastSeenTime
Add Enum key CurrentStateSupported Key Types
| Type | Description |
|---|---|
| Bool | True/false flags |
| Int | Integer values |
| Float | Decimal numbers |
| String | Text data |
| Name | FName values |
| Vector | 3D positions |
| Rotator | 3D rotations |
| Object | UObject references |
| Class | UClass references |
| Enum | Enumeration values |
Assign Blackboard
Set the Blackboard for BT_EnemyAI to BB_EnemyDataExample: Patrol and Chase AI
Create BT_GuardAI with:
Root Selector:
├── Sequence "Chase" (with Blackboard decorator on CanSeePlayer)
│ ├── MoveTo task (TargetActor key)
│ └── Wait task (0.5 seconds)
└── Sequence "Patrol"
├── MoveTo task (PatrolPoint key)
├── Wait task (3 seconds)
└── Service: UpdatePatrolPoint
Create BB_GuardData with:
- Bool: CanSeePlayer
- Object: TargetActor (Actor class)
- Vector: PatrolPoint
- Int: CurrentPatrolIndexTree Structure
The tool maintains parent-child relationships:
Add Selector at root
Add Sequence under root Selector
Add MoveTo under the Sequence
Add Cooldown decorator on the SequenceDecorators and Services attach to their parent node.
Tips
- Build top-down: Start with root, add composites, then tasks
- Name nodes: Use descriptive names for easier reference
- Use Blackboard: Store state in Blackboard keys, not variables
- Test incrementally: Build small, test, then expand