Win Screen not showing

The win screen is not showing because even when the last enemy is killed it returns because ones said to be still alive. But there’s no other pawn but the player. Could anyone help me out.

for (AShooterAIController* Controller : TActorRange<AShooterAIController>(GetWorld()))
    {
        if (!Controller->IsDead())
        {
            UE_LOG(LogTemp, Warning, TEXT("fail"));
            return;
        }
        UE_LOG(LogTemp, Warning, TEXT("killed"));
    }
    UE_LOG(LogTemp, Warning, TEXT("Success"));
    EndGame(true);

This kills and fails every time after every enemy is killed.

Did you search the world outliner for any possible characters remaining?

A very good suggestion, I must have forgotten that I placed another. There was in fact another one in the level.

Thank you

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms