Compare commits

..

3 Commits

Author SHA1 Message Date
baz 16a5b98945 Fix Input 2024-06-15 00:46:18 +01:00
baz df6ee9f7f6 Add Default Level 2024-06-15 00:46:14 +01:00
baz 0917e54fdd Create Test Enemy 2024-06-15 00:44:19 +01:00
9 changed files with 29 additions and 4 deletions

View File

@ -1,9 +1,10 @@
[/Script/EngineSettings.GameMapsSettings]
GameDefaultMap=/Engine/Maps/Templates/OpenWorld
GameDefaultMap=/Game/Levels/Level.Level
GlobalDefaultGameMode=/Game/Gamemode/BP_DefaultGamemode.BP_DefaultGamemode_C
GameInstanceClass=/Script/vampires.VampireGameInstance
EditorStartupMap=/Game/Levels/Level.Level
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12

BIN
Content/Enemy/BB_Enemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Enemy/BP_AIController.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Enemy/BP_EnemyCharacter.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Enemy/BT_Enemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Enemy/M_Test.uasset (Stored with Git LFS) Normal file

Binary file not shown.

BIN
Content/Input/IMC_Player.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Levels/Level.umap (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -22,6 +22,13 @@ void AVampireAIController::BeginPlay()
void AVampireAIController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (AVampireCharacter* Player = Cast<AVampireCharacter>(UGameplayStatics::GetPlayerCharacter(GetWorld(), 0)))
{
Blackboard->SetValueAsObject("Player", Player);
auto location = Player->GetActorLocation();
Blackboard->SetValueAsVector("PlayerLocation", location);
}
}
void AVampireAIController::OnPossess(APawn* InPawn)
@ -38,7 +45,6 @@ void AVampireAIController::OnPossess(APawn* InPawn)
Blackboard->InitializeBlackboard(*bt->BlackboardAsset);
BehaviorTree->StartTree(*bt);
Blackboard->SetValueAsObject("SelfActor", EnemyCharacter);
Blackboard->SetValueAsObject("Player", UGameplayStatics::GetPlayerCharacter(GetWorld(), 0));
}
}