Setting up a behavior tree on an agent
To begin delving into the AI agent behavior tree, the first step is to compile the entire project. Once the process is finished, your custom tasks and services will be available as an option in the behavior tree.
Note
If you are unfamiliar with the Unreal Engine compilation process, my advice is to take a peek at Appendix A, Understanding C++ in Unreal Engine, and then return to this chapter.
Once the compilation phase is finished, we can start editing the behavior tree.
Editing the behavior tree
Open the BT_RoamerDummy asset we previously created and locate the only element – the ROOT node – present in the graph; you will see that it has a darker area at the bottom.
Figure 8.11 – The ROOT node
Clicking and dragging from this area will make all the nodes that can be connected to the ROOT node available.
Note
Moving forward, whenever I mention the task of adding a node, I will...