In addition to Services, we also have Tasks, which are leaf nodes of Behavior Trees. These are the things that actually perform actions. In our example, we are going to have our AI follow our target, the player.
Creating a BTTask
Getting ready...
Finish the previous recipe, Creating a BTService.
How to do it...
- From the Content Browser, select Add New | New C++ Class. From the Choose Parent Class menu, check the Show All Classes option and look for the BTTask_BlackboardBase class. Select it and then hit the Next button:
- At the next menu, set its name to BTTask_MoveToPlayer...