Alternative Check for "DeadActor is from type APawnTurret"

Hi,

just for your interest, I found this is also a way to go:

if (DeadActor->IsA(APawnTurret::StaticClass()))
    {
        TurretSum--;
        Cast<APawnTurret>(DeadActor)->Die();
        if (TurretSum <= 0)
        {
            HandleGameOver(true);
        }
        
    }
1 Like

This is awesome :grin:

Privacy & Terms