Behavior Tree Node Reference: Tasks

Reference for the Behavior Tree Task nodes.

Windows
MacOS
Linux

This is a reference page for the Task nodes available in the Behavior Tree Editor. Tasks are nodes that "do" things, like move an AI, or adjust Blackboard values. They can have Decorators or Services attached to them.

Finish With Result

FinishWithResult.png

The Finish With Result Task node can be used to instantly finish with a given result. This node can be used to force a branch to exit or continue based on the defined result.

Property

Description

Result

Succeeded

Finishes with success.

Failed

Finishes with failure.

Aborted

Finishes and aborts.

In Progress

Finishes as in-progress.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Make Noise

MakeNoiseNode.png

If the controlled Pawn has the PawnNoiseEmitter Component, the Make Noise Task will cause the Pawn to "produce a noise" (send a message) that other Pawns with the PawnSensing Component can hear (receive the message).

Property

Description

Loudness

How loud the generated sound is.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Move Directly Toward

MoveDirectlyToward.png

The Move Directly Toward Task node moves the AI Pawn toward the specified Actor or Location (Vector) Blackboard entry in a straight line, without regard to any navigation system. If you need the AI to navigate, use the Move To Task node instead.

Property

Description

Acceptable Radius

How close does the Pawn have to be to the target for the Task to succeed.

Filter Class

Which navigation data should be used? If set to None the default navigation data will be used.

Allow Strafe

Whether to enable the AI's ability to strafe while moving towards the destination.

Reach Test Includes Agent Radius

If enabled, the radius of the AI's capsule will be added to the threshold between the AI and goal location.

Reach Test Includes Goal Radius

If enabled, the radius of the goal's capsule will be added to the threshold between the AI and goal location.

Allow Partial Path

If enabled, allow the AI to use an incomplete path when the goal cannot be reached.

Track Moving Goal

If enabled, the path to the goal Actor will update itself when the Actor moves.

Project Goal Location

If enabled, the goal location will be projected on the Nav Mesh before using.

Blackboard Key

The Key to check. This is most useful for data types that can return None such as Objects, as other types may return their initialized values (for example: 0, false, {0,0,0}).

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Move To

MoveToNode.png

A Move To Task will cause a Pawn with a Character Movement component to move using the NavMesh to a Vector Blackboard key.

Property

Description

Acceptable Radius

How close does the Pawn have to be to the target for the Task to succeed.

Filter Class

Which navigation data should be used? If set to None the default navigation data will be used.

Allow Strafe

Whether to enable the AI's ability to strafe while moving towards the destination.

Reach Test Includes Agent Radius

If enabled, the radius of the AI's capsule will be added to the threshold between the AI and goal location.

Reach Test Includes Goal Radius

If enabled, the radius of the goal's capsule will be added to the threshold between the AI and goal location.

Allow Partial Path

If enabled, allow the AI to use an incomplete path when the goal cannot be reached.

Track Moving Goal

If enabled, the path to the goal Actor will update itself when the Actor moves.

Project Goal Location

If enabled, the goal location will be projected on the Nav Mesh before using.

Blackboard Key

The Key to check. This is most useful for data types that can return None such as Objects, as other types may return their initialized values (for example: 0, false, {0,0,0}).

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Play Animation

PlayAnimationNode.png

The Play Animation node can be used to play the specified animation asset.

Property

Description

Animation to Play

Animation asset to play.

The animation selected must match the Skeleton of the Pawn the Behavior Tree is controlling.

Play Sound

PlaySoundNode.png

The Play Sound node will play the sound given in the Sound to Play property.

Property

Description

Sound to Play

The Sound Cue asset to play.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Push Pawn Action

PushPawnActionNode.png

The Push Pawn Action node enables you to push the specified action to the Pawn's Controller.

Property

Description

Action

The type of action to push to the Pawn's Controller.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Rotate to face BB entry

RotateToFaceBBEntry.png

The Rotate to face BB entry Task causes the associated Pawn to rotate towards the specified Blackboard Key.

The Pawn must have Use Controller Rotation Yaw enabled to successfully rotate.

Property

Description

Precision

The amount in degrees to be considered as a success condition.

Blackboard Key

The Blackboard Key to get the target to turn toward. This can be either a Vector, Object or Actor.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Run Behavior

RunBehaviorNode.png

The Run Behavior Task enables you to run another Behavior Tree by pushing sub-trees onto the execution stack. One limitation to consider however is that the subtree asset cannot be changed during runtime. This limitation is caused by support for the subtree's Root level Decorators, which are injected into the Parent tree. Also, the structure of the running tree cannot be modified at runtime.

You can use Run Behavior Tree Dynamic if you need a subtree that can be changed at runtime.

Property

Description

Behavior Asset

The Behavior Tree asset to run.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Run Behavior Dynamic

RunBehaviorTreeDynamicNode.png

The Run Behavior Dynamic Task enables pushing subtrees on the execution stack. Subtree Asset can be assigned at runtime with the SetDynamicSubtree function on a Behavior Tree Component.

This does not support a subtree's Root level Decorator.

Property

Description

Injection Tag

Opens the Gameplay Tag Editor that you can use to identify this Task for subtree injection.

Default Behavior Asset

The initial Behavior Tree asset to run.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Run EQS Query

RunEQSQueryNode.png

The Run EQS Query node runs the specified Environment Query System (EQS) asset when the Task node is executed.

Property

Description

Blackboard Key

The Blackboard Key value to update based on the EQS results.

Query Template

The EQS asset to run.

Query Config

The additional parameters to include as part of the EQS test.

EQSQuery Blackboard Key

Optional Blackboard Key storing an EQS Query Template to use instead of specifying one under the Query Template.

Run Mode

Single Best Item

Pick the first item with the best score.

Single Random Item from Best 5%

Pick a random item with score 95% to 100% of max.

Single Random Item from Best 25%

Pick a random item with score 75% to 100% of max.

All Matching

Get all items that match conditions.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Set Tag Cooldown

SetTagCooldown_Task.png

Sets a Cooldown Tag value and is used with Cooldown Tag Decorators to prevent Behavior Tree execution.

Property

Description

Cooldown Tag

The GameplayTag that will be used for the Cooldown.

Cooldown Duration

How long the Cooldown is in seconds.

Add to Existing Duration

If there is an existing Cooldown on the given GameplayTag, should we add more?

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Wait

WaitTask.png

The Wait Task can be used in the Behavior Tree to cause the tree to wait on this node until the specified Wait Time is complete.

Property

Description

Wait Time

How long to wait, in seconds.

Random Deviation

Allows adding a random time (plus or minus) to the Wait Time property.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Wait Blackboard Time

WaitBlackboardTime_Task.png

Works just like the Wait Task node, except it will pull a Blackboard value for how long it should wait.

Property

Description

Blackboard Key

The float Blackboard Key to reference for how long to wait.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Node Name

The name the node should display in the Behavior Tree graph.

Custom Tasks

CustomTaskCreation.png

You can create new Tasks with your own custom Blueprint logic and (or) parameters by clicking the New Task button.

CustomTaskToolbar.png

Blueprint Tasks are slower than native Tasks. If you are looking to optimize your content, switch to using native Tasks.

The following parameters will also be included with your custom logic.

Property

Description

Show Property Details

Show detailed information about properties on the node.

Node Name

The name the node should display in the Behavior Tree graph.

Ignore Restart Self

If enabled, Task search will be discarded when this Task is selected to execute but is already running.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback