ID:150179
 
you the man, you help everyone in the forum from what i see, and i also see you dont like dbz... i dont blame you to many dbz games in hub there is about 20 right now lol.

but im making a game that aint dbz but will have a gym a training gym has weights and stuff. and it has Punching Bags.
but they die :(
can you help with a short code please?
Thanks
- RaeKwon
Ack, good god man! Lay off the html, and sure I'll help ya'


mob/verb/Attack(mob/M as mob in oview(1))
var/damage=//insert your damage stuff here
M.health-=damage
M.deathcheck()

mob
proc
deathcheck()
if(src.health<=0)
if(!src.client)//if there's not client attached to it
..()
else
src.loc=locate(x,y,z)//change x y z to coords you want them to goto after they die or just delete them using del(src)
src<<"You were killed!"
world<<"[src] was killed!"


Edit this code as you please it does what you want it to do.
This code may not look short to you, but after coding over 2,000 lines of AI today it's very very short to me.