[Help] Killing Proplem.

07/30/2013 23:12 XDestroyer2011#1
I have a stupid problem..
My problem is , that when i use a multihit skill .. like mortal wound
TwoFoldBlades . And Many Others
U kill the monster or the player more than 1 time.
I hope some one could help me ..
07/30/2013 23:35 EgyptianMano#2
seems u call the receive damage functions multiply as well as the skill itself, if so then u need to edit the damage calculations at the skill case ,
calculate the first hit damag as dmg1
if attacked.hp > dmg1 then calculate the second hit damage as dmg2
if attacked.hp> dmg1+dmg2 calculate the third hit damage as dmg 3
and so on
then call the receive damage void as receivedamage(dmg1+dmg2+dmg3)
07/31/2013 04:22 XDestroyer2011#3
Didnt understand nothing .. may u give me more details
07/31/2013 05:40 pro4never#4
Just check in your receive damage method that the target is not already dead. If they are then you can safely return without issue.

Sanity checks are always a good idea <3
08/03/2013 15:46 urfinator#5
Thanks!