CS2D
Maps/Editor Respawning NPCs Respawning NPCs
3 replies I was wondering if there's a way to respawn NPCs after they die. I plan to use this to respawn zombies for a Resident Evil The Hive custom map I'm making. I've seen this done in a map I think was called zombie land and the head crabs respawned after they were killed. I tried replicating but failed. If theres anything that can help me out I'd be greatful, thanks. Avo User Offline
I believe simple lua script would be good for that DC Admin Offline
It's not documented but env_npc triggers its triggers when the related NPC is killed. Moreover when it is triggered, it spawns a new NPC.
So you can even do respawning very easily with the editor only: Just enter the same name/value for the name and for the trigger field of the NPC. This basically means: The entity will trigger itself when its NPC is killed, making it spawn a new NPC.
Note that if you want to do this with multiple NPC entities, you have to choose unique names for each entity otherwise ALL will spawn new NPCs if ANY NPC is killed. Awesome thanks so much cx