- Joined
- Oct 7, 2010
- Messages
- 30
Hey, I want to make a floating text appear above a unit telling how much damage was taken, and I've also based the damage dealt on a trigger.
Atm it basically looks like this (I do have more to remove the text but that isn't important for my question):
My problem is that I want this action to take place once the unit is hit, not when it is attacked, but the only event action I could find to suit what I want is:
(The main problem is that in cases where the triggered damage 1hits the target, the hero never actually attacks before the other units dies, so the hero with just spin around at super speed without attacking and everything will die)
EDIT:
Ok, so I've worked out the damage detection, but now a can't have a damage action in the trigger or the event will loop itself >.< Is there any solution for this?
Atm it basically looks like this (I do have more to remove the text but that isn't important for my question):
- Set Damage[(Player number of (Owner of (Attacking unit)))] = (1 + ((Agility of (Attacking unit) (Exclude bonuses)) x ((Agility of (Attacking unit) (Include bonuses)) / 50)))
- Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real(Damage[(Player number of (Owner of (Attacking unit)))])) damage of attack type Normal and damage type Normal
- Floating Text - Create floating text that reads (String(Damage[(Player number of (Owner of (Attacking unit)))])) above (Attacked unit) with Z offset 5.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
My problem is that I want this action to take place once the unit is hit, not when it is attacked, but the only event action I could find to suit what I want is:
- Unit - A unit Is attacked
(The main problem is that in cases where the triggered damage 1hits the target, the hero never actually attacks before the other units dies, so the hero with just spin around at super speed without attacking and everything will die)
EDIT:
Ok, so I've worked out the damage detection, but now a can't have a damage action in the trigger or the event will loop itself >.< Is there any solution for this?
Last edited: