This repository has been archived on 2026-05-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
AgrarianGameArchive/Source/AgrarianGame/Variant_Combat/AI/CombatAIController.cpp
T

20 lines
545 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CombatAIController.h"
#include "Components/StateTreeAIComponent.h"
ACombatAIController::ACombatAIController()
{
// create the StateTree AI Component
StateTreeAI = CreateDefaultSubobject<UStateTreeAIComponent>(TEXT("StateTreeAI"));
check(StateTreeAI);
// ensure we start the StateTree when we possess the pawn
bStartAILogicOnPossess = true;
// ensure we're attached to the possessed character.
// this is necessary for EnvQueries to work correctly
bAttachToPawn = true;
}