ID:263723
 
Code:
mob
proc
DeathCheck(mob in world)
if(istype(src,/mob/Enemy/))
if(src.hp <= 0)
range() << "<font color=red><B><small><B>Combat Info:<B><small> [src] has been killed by [usr]."
usr.gold += rand(5,10)
usr<<"<small><b><font color=yellow>You gained some gold!"
del(src)
Respawn()
else
if(src.hp <= 0)
world<<"<font color=red><b><small>[src] has been killed by [usr]."
src.hp = src.maxhp
src.loc =locate(98,66,8)
Respawn()
var/newMonsterType = src.type
var/X = src.x
var/Y = src.y
var/Z = src.z
var/rSpeed = src.respawnSpeed
src = null
spawn(rSpeed)
new newMonsterType (locate(X, Y, Z))


Problem description:
When you kill an enemy it doesn't seem to delete from the map. Can someone please point out any mistake you see and tell me how to fix mine?
who is the src in your code, use the code bellow to check the src
mob
proc
DeathCheck(mob in world)
usr<<src
if(istype(src,/mob/Enemy/))
if(src.hp <= 0)
range() << "<font color=red><B><small><B>Combat Info:<B><small> [src] has been killed by [usr]."
usr.gold += rand(5,10)
usr<<"<small><b><font color=yellow>You gained some gold!"
del(src)
Respawn()
else
if(src.hp <= 0)
world<<"<font color=red><b><small>[src] has been killed by [usr]."
src.hp = src.maxhp
src.loc =locate(98,66,8)
Instead of "DeathCheck(mob in world)" try to have "DeathCheck(mob/M as mob in world)" or "DeathCheck(mob/M as mob)"
No put usr in proc. Ungh.

Lummox JR
Could it be the Respawn() proc that makes the monster respawn too fast and it looks like it doesn't even die?