No, it’s not. I checked again and they only seem to share knowledge of the player position the first time one of the AIControllers sees the player. All of the others come to investigate at the same spot. After that they behave as expected of individuals.
Oh, wait a minute… I thought there could be something wrong in my version of AShooterAIController::BeginPlay() and sure there is:
void AShooterAIController::BeginPlay()
{
Super::BeginPlay();
/*Uh, oh1*/APawn* PlayerPawn = UGameplayStatics::GetPlayerPawn(GetWorld(), 0);
//SetFocus(PlayerPawn, EAIFocusPriority::Default);
if (AIBehavior != nullptr) {
RunBehaviorTree(AIBehavior);
/*Uh, oh2*/GetBlackboardComponent()->SetValueAsVector(TEXT("PlayerLocation"), PlayerPawn->GetActorLocation());
GetBlackboardComponent()->SetValueAsVector(TEXT("StartLocation"), GetPawn()->GetActorLocation());
/*Uh, oh3*/GetBlackboardComponent()->SetValueAsVector(TEXT("LastKnownPlayerLocation"), PlayerPawn->GetActorLocation());**
}
}
I was setting up the player location at BeginPlay! Commenting out the /*uh, oh*/
lines and recompiling fixed this. I probably missed the part where Sam removes this code from ShooterAIController, my bad.
@DanM Thanks for pointing me on the right direction, though. I didn’t know about that checkbox, and this kind of behaviour would be actually alright for a stealth game, so I learned something new from this.