How to do it...

  1. 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:
  1. At the next menu, set its name to BTTask_MoveToPlayer and then click on the Create Class option:
  1. Open Visual Studio and add the following function to BTTask_MoveToPlayer.h:
#pragma once#include "CoreMinimal.h"#include "BehaviorTree/Tasks/BTTask_BlackboardBase.h"#include "BTTask_MoveToPlayer.generated.h"/** *  ...

Get Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition 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.