Creating a custom service using C++

Now that we have finished creating the behavior tree for our AI, it is about time we go about setting the blackboard keys that a large amount of our logic is based on. We are going to do this with a service. As stated previously, a service is something that will take place at a certain frequency or tick. Services act as a way to update AI information and states during runtime from the behavior tree. We have created enough BT assets using blueprint, so it is time we create one in C++! The purpose of this service is to check an area around the AI for an ABMCharacter, if one is found, set it as the target for the AI to follow.

Start by creating a new C++ class via the wizard, this time the class will inherit from ...

Get Unreal Engine 4.X By Example 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.