ID:1618828
 
(See the best response by Nadrew.)
Code:
mob
proc
DeathCheck(mob/M)
if(M.client)
M<<"[src.monstername] has killed you."
var/obj/O=new/obj/Blood/Corpse
O.name="[M]'s Corpse"
O.loc=loc
M.loc=locate(31,43,2)
M.HP=50
sleep(600)
del(locate(/obj/Blood/Corpse) in O.loc)


Problem description: Working on a system where upon death, the player's corpse shows up on the map so other players know where an area is full of dangerous enemies (Dark Souls, Demons Souls, etc.)

Now, I don't want the corpse to stay there forever, so is there a way to make the corpse vanish after about five minutes or so?

Screenshot below showing the corpse dropped after death. Just generally trying new things with this game, so hence all the help and questions.

Apologies if I'm bugging you all at this point.



Best response
You can probably just terminate it from within the corpse's New() proc.

obj/Blood/Corpse
New()
..()
spawn(600) del(src)
In response to Nadrew
Oh, thank you! That was it.

You're the bomb, mate.