UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a zombie spawner"
// Spawn a zombie void AZombieSpawner::SpawnZombie() { // Get a random location to spawn the zombie FVector SpawnLocation = GetRandomSpawnLocation(); // Spawn the zombie UWorld* World = GetWorld(); if (World) { World->SpawnActor<AZombie>(ZombieClass, SpawnLocation, FRotator::ZeroRotator); } }