ID:142036
 
Code:
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?

: operator = bad.

The loop is probably on your verb that's used for attacking.

Just return after that and it's fine.
In response to Andre-g1
Nope i found the problem its sleep(100) i took it out and it started working just fine problem is it has to wait to look right i switched it to spawn but its not spawning it doesnt stop the proc at all -__-
In response to SadoSoldier
New(mob/M in world)

What in the world is that doing?
In response to A.T.H.K
i put it there because i thought i needed the M o.o but i was wrong