OK I'm using a setup very similar to the FPS tutorial where my enemies, in this case "Alien Zombies" start off at "Way Points" but when I kill them they are dead.
How can I have them respawn at the same location they started off from say after 40 seconds or so after they have disolved/destroyed?
Thomas: Do you mean that I add this to my Alien Zombie's dead replacement?
private var dieTime = Time.time; //When it dies
private var deadTime = 40.0f; //Time dead
function Update () {
if (Time.time > (dieTime + deadTime))
{
Instantiate(alienZombiePrefab, transform.position, Quaternion.identity);
}
}
If I'm following you corectly I get this error: Assets/WeaponScripts/ZombieAlienRespawn.js(7,29): BCE0005: Unknown identifier: 'alienZombiePrefab'.
Thanks Thomas, I edited my question with my result so I think I'm doing it wrong or miss reading something?
– anon48034950