ID:146932
 
        MonsterDeath(mob/M)
if(M.HP <= 0)
del(src)

Will it check to see if the monster(the thing other then usr) is dead and delete it?
No.

Why delete the src if it's checking the mob?
In response to Hell Ramen
mob
proc
DeathCheck()
if(client)
usr.loc = locate(/turf/Start)
world << "[usr] has been killed!"
else
del(src)
Ok I changed it a little, Will this work?
Loch wrote:
>       MonsterDeath(mob/M)
> if(M.HP <= 0)
> del(src)
>

Will it check to see if the monster(the thing other then usr) is dead and delete it?

I'd do this, personally, but that doesn't mean you have to:

mob
Monster
HP = 5
Click()
..()
MonsterDeathCheck(src)
return
//------------------------------------------------------------------------------------------//


proc
MonsterDeathCheck(mob/Monster/M in world)
if(M.HP <= 0)
del(M)



Yeah..passing "src" on as an argument to the proc.
In response to Loch
use mob/proc/DeathCheck(mob/M)

The M is the killer, the src is the attacker if:
you call it like: M.DeathCheck(src)
[Edit]That may work, sorry if it doesn't.
In response to Loch
Loch wrote:
mob
proc
DeathCheck()
if(client)
usr.loc = locate(/turf/Start)
world << "[usr] has been killed!"
else
del(src)
Ok I changed it a little, Will this work?

That's the wrong way to go. The very first rule of thumb you must take to heart when programming in DM: No put usr in proc. Ungh.

Besides, the victim should be src. DeathCheck() primarily affects the victim, not the killer, so it should belong to the victim. The killer is not usr, but should instead be sent as an argument.

Lummox JR