- Joined
- Apr 8, 2007
- Messages
- 116
Well, first background: what I'm basically trying to do is create a trigger that causes a ground unit, when attacked, to lose 10% of damage done from his mana. And no, feedback is not viable because there is no editable portion that removes mana according to how much damage is dealt, you can only edit how much bonus life is lost and the maximum mana that can be drained, both of which don't really work for my trigger.
So I need to input 'damage done' as a value in my trigger to get it to work properly; and yet again, event - unit takes damage doesn't work either as that only is only available for a specific unit trigger, whereas mine needs to be a generic unit trigger (as it effects all ground units including all those that would be made in the future).
Anyhoo, I've got:
Event - unit attacked
Action:
-Set LifeofUnit(a "Real" variable, and I'm assuming that real also covers unit properties, since an integer variable is unable to be input in my trigger- perhaps I'm using the wrong variable?) = Life of Attacked unit
-Unit set mana of (attacked unit) to ((mana of (attacked unit )) - (((LifeofUnit - Life of (Attacked Unit)) / 10.00))
..so..any helpful ideas?
So I need to input 'damage done' as a value in my trigger to get it to work properly; and yet again, event - unit takes damage doesn't work either as that only is only available for a specific unit trigger, whereas mine needs to be a generic unit trigger (as it effects all ground units including all those that would be made in the future).
Anyhoo, I've got:
Event - unit attacked
Action:
-Set LifeofUnit(a "Real" variable, and I'm assuming that real also covers unit properties, since an integer variable is unable to be input in my trigger- perhaps I'm using the wrong variable?) = Life of Attacked unit
-Unit set mana of (attacked unit) to ((mana of (attacked unit )) - (((LifeofUnit - Life of (Attacked Unit)) / 10.00))
..so..any helpful ideas?