class AROUNDTHECORNERC_API AMonster_Bot : public ACharacter
{
GENERATED_BODY()
public:
// Sets default values for this character's properties
AMonster_Bot();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
UPROPERTY(EditAnywhere, Category = Behavior)
class UBehaviorTree* BotBehavior;
};
See, that was my first thought, however every line works apart from
“BlackboardComp->InitializeBlackboard(bot->BotBehavior->BlackboardAsset);”
“bot && bot->BotBehavior” works fine. If I do “bot->BotBehavior;” it works fine as well. Its just when trying to expand from BotBehavior. I also have it public.
Its also included. Also just to confirm I do include the .h file right?
Make sure you have all header files included that are necessary. I have a header file that contains all my headers, so right now i don’t know which
headers are exactly needed. But i guess you are missing the BehaviorTree ones.
Inside your .h files from the Controller, add these includes:
I think I was missing BehaviorTree.h
However, I have a new error now on the same line. "Error: a reference of type “UBlackboardData &” (not const-qualified) cannot be initialized with a value of type “UBlackboardData *” "
): No sorry. At least not without searching for it myself. But normaly you should be able to fix errors like these yourself. Or you still need to learn basic c++ first.