Constructing Task nodes

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.

Getting ready

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).

How to do it…

  1. To construct a Task node with an executable Blueprint code inside it, you must select New Task from the ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.