Update Basic Enemy Behaviour Tree to Patrol

This commit is contained in:
Philip W 2023-10-04 01:24:03 +01:00
parent 282705ed2f
commit 395ea7baa4
5 changed files with 9 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -19,6 +19,7 @@ EBTNodeResult::Type UBTTask_AttackPlayer::ExecuteTask(UBehaviorTreeComponent& Ow
FVector const Origin = AIController->GetPawn()->GetActorLocation(); FVector const Origin = AIController->GetPawn()->GetActorLocation();
FVector const PlayerLocation = Blackboard->GetValueAsVector("TargetLocation"); FVector const PlayerLocation = Blackboard->GetValueAsVector("TargetLocation");
DrawDebugLine(GetWorld(), Origin, PlayerLocation, FColor::Green, false, 1.f, 0, 1.f); DrawDebugLine(GetWorld(), Origin, PlayerLocation, FColor::Green, false, 1.f, 0, 1.f);
FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded); FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded);
return EBTNodeResult::Succeeded; return EBTNodeResult::Succeeded;
} }