ID:150125
 
Ok this is mainly for those of you who have seen my Bump Combat system in action and understand once your health gets to 0 or below it does a Death(M) check.
problem is people are getting punches in after the other person is dead and should no longer even be there to attack. Is there a way to immediately locked down all the stats of one side? one be *usr* the other being *mob/M as mob*??

LJR
Isn't it enough to do a quickcheck of the hitpoints in the Bump() proc, and see if the target is dead?


/Andreas
In response to Gazoot
If its going so fast people can get attacks in after the other person is dead, either you have faulty code or you need to limit the attack speed. There are many ways of doing it, most people just stick a sleep() or spawn() in the attacks, others control it with an event loop. I parse it through a cycle that runs every tick and pass it on to a proc called Do_Action() which then calls the appropriate action.

Alathon
In response to Gazoot
Gazoot wrote:
Isn't it enough to do a quickcheck of the hitpoints in the Bump() proc, and see if the target is dead?

Yeah, the attacker can always check to see if the victim is dead before attacking.

Also, I have all damage given through a single TakeDamage() proc, which doesn't do anything if the mob is dead.
In response to Deadron
Hmm I've done everything suggested here, and still nothing works. Could I see some snips of other people's death check code?

LJR
In response to LordJR
LordJR wrote:
Hmm I've done everything suggested here, and still nothing works. Could I see some snips of other people's death check code?

It's hard for me to past it to this machine, but it's literally as simple as this:

Attack(mob/victim)
if (victim.isDead())
return
victim.TakeDamage(src, 1)

TakeDamage(mob/attacker, amount)
if (isDead())
return
health -= amount