Remove Dead NPC

Alright so I’ve been working on a script and I’ve fooled around with the check state of NPC and the likes. I just can’t get what I’m trying to do to work.

I don’t have the code snippet because I deleted it, but I want my script to basically check if a certain NPC is dead and if he is to remove his corpse and then respawn said NPC an allotted amount of time after the death.

Is there any way of doing this?

Use these function, timer.Create(), ents.Create() and ent:Alive().

[lua]player:Alive()[/lua] Is only for players.

npc:GetNPCState( ) can get if the NPC is alive by not being dead.

Will Entity:Remove( ) take out the dead NPC body?

…yes…