Task nodes are like function blocks. Each Task node you construct will allow you to bundle up some Blueprint code for execution when certain conditions in your Behavior Tree are met.
Tasks have three distinct events: Receive Tick (with AI version), Receive Execute (AI), and Receive Abort (AI). You can respond to any of these three events in the Task's Blueprint. Usually, you should respond to the Receive Execute (AI version) of the Task.
To create a Task node, you should already have a Behavior Tree ready and attached to an appropriate AI Controller and Blueprinted Character (see previous recipe).
To construct a Task node with an executable Blueprint code inside it, you must select New Task from the menu bar from our Behavior Tree Blueprint editor. From the drop-down menu that appears, select to base your New Task on
BTTask_BlueprintBase
.