ID:177852
 
how do i go about making a sepreat deathcheak for a punching bag?
well, all you have to do is make another proc called pbdeathcheck() or whatever, and have that proc execute when they punch the pb. although, you can't do this if you made the pbag a mob, so make it a turf instead.











<<lg>>>>
In response to Lucas Gates
Don't make it a turf. Make it an obj. Better yet, don't make one at all!

RaeKwon
In response to RaeKwon
Here for an obj.
obj/PunchingBag
icon = 'punchingbag.dmi'
verb/Punch()
usr << "You hit the bag, You lil Thuper Thaiyan you!"
if(M.health -= usr.str - M.defense)
var/damage = usr.str - M.defense
usr << "You attack [M] for [damage]"
M.health-=damage
switch(rand(1,5))
if(1)
usr << 'Oh No. You Gained Thuper Gainings!!"
usr.str+=1
usr.defense+=1
else ..()
else usr << "Haha, Thuper Pbag to the rescue!!"


Here for a mob
obj/PunchingBag
icon = 'punchingbag.dmi'
verb/Punch()
usr << "You hit the bag, You lil Thuper Thaiyan you!"
if(M.health -= usr.str - M.defense)
var/damage = usr.str - M.defense
usr << "You attack [M] for [damage]"
M.health-=damage
M.DeathCheck()
else usr << "Haha, Thuper Pbag to the rescue!!"

mob/proc/DeathCheck()
if(istype(src,/mob/PunchingBag))
usr << "Oh no. You Gained some more power!"
usr.str+=1
usr.defense+=1
new/mob/PunchingBag()


RaeKwon