Understanding tasks
In this section, I will provide you with additional information to enhance your understanding of tasks. Let’s explore these details together to further strengthen your grasp of tasks within the context of behavior trees.
Creating C++ tasks
A task extends from the BTTask
class, and its main implementable functions are as follows:
ExecuteTask()
: This will start the task execution and will return the task resultAbortTask()
: This will let you handle events where a task should be stopped
This is usually all you need to create even a simple yet fully working task.
Creating Blueprint tasks
When creating a task using Blueprints Visual Scripting, you will be extending from the BTTask_BlueprintBase
class as it provides additional code logic to facilitate its implementation. As you may have guessed, there are two ways to create a task: the usual creation from Content Drawer, and the New Task selection button directly from the behavior...