mob
NPC/name="NPC"
icon='body.dmi'
icon_state="normal"
New(mob/M in world)
var/obj/O=new/obj
O.icon='head.dmi'
src.overlays+=O
src.race = "NPC"
src.health = 100
..()
Death()
if(src.health <= 0)
if(src.race == "Zombie")
if(src.isplayer == 0)
src.health = 40
src.loc = locate(/turf/zombiespawn)
else
src.loc = locate(/obj/playerspawn)
if(src.race == "Human")
src.icon = 'infected.dmi'
var/obj/C8=new/obj
C8.icon = 'head.dmi'
src.overlays -= C8
src.frozen = 1
sleep(100)
src.race = "Zombie"
src.icon = 'body.dmi'
var/obj/C9=new/obj
C9.icon='head.dmi'
src.health = 40
src.overlays+=C9
src.rundelay = 4
world << "*[src] has died!*"
var/D = new/obj/playerspawn
D:loc = locate(src.x,src.y,src.z)
src.health = 40
src.race = "Zombie"
Problem description: For some reason when [src] dies it keeps repeating [src] has died! over and over and over again i looked for an inf loop but i couldnt find one so any help?
The loop is probably on your verb that's used for attacking.
Just return after that and it's fine.