ID:140291
 
Code:
mob/proc
deathcheck(mob/M)
if(M.hp <= 0 && !M.client)
src<<"<b>You killed [M]"
distDropsAndDie(M)
else if(M.hp <= 0 && M.client)
M.hp=M.mhp

distDropsAndDie(mob/M)
if(M.hp <= 0 && !M.client)
src.exp += M.givExp
src.lvCheck()
del(M)
return
else
return


mob
Monsters
icon = 'mon.dmi'
canMove = 1
inair = 1
Blobble
name = "Blobble"
lv = 1
givExp = 50
distDropsAndDie() // has been tried as distDropsAndDie(src).
new /obj/item/Advancement_Crystal(loc)


Problem description:
Okay, well. As you can see, I have a proc called distDropsAndDie. I read another post saying that you could call a proc like this (that deletes the monster) to use for monster drops. The only problem is, that it's not dropping. I have tried the distDropsAndDie with an arg (src), and that doesn't work either. Comments, suggestions, help?

Thanks in advance.
Your deathcheck() is backwards. src should be the mob dying, and M should be the mob killing src. Change how you call it appropriately, as well.
In response to Garthor
Oh, alright. It works now.
Thanks a lot.

*Edit*
It drops the item, but it makes me have to hit the mob a second time just to get it. Even though it says I killed the blobble, I level up, etc.

I have changed both the deathcheck and distDropsAndDie proc.
You're deleting the mob before it can drop anything.

distDropsAndDie() <- mob is deleted in this proc
new /obj/item/Advancement_Crystal(loc)
In response to Ruben7
Wrong.
In response to Garthor
Yeah he kinda put src where M should be and vice versa >_>, never mind.