I've been trying to crack this spell for about 3 days now... I've searched the forums for similar spells but i could only find spells that didn't work the way i want to, or spells that were done on JASS, and i need them on GUI. :banghead:
Well, pretty much what i need is an absorption spell that can be cast on any friendly unit... Now, i've tried several approaches to this and wasn't able to make them work the way i want to.
First i've tried the usual approach, the unit takes damage and it's instantly healed afterwards. But this results in the problem that if the unit takes more damage than it's own health pool, it will die before it can get healed. Since this is kinda the idea of the map, this won't do :thdown:.
So i've figured i had to use some kind of spell to mitigate all the damage, and then do the math using "Trigger - Add to PW Damage <gen> the event (Unit - PlayerClass[(Integer A)] Takes damage)" and only damage the player with the remaining damage.
Now the only spell i know that can do this is the mana shield. The problem is that the mana shield must be activated by the target and cannot be cast by another player. So the only way that i can do this is actually adding Mana Shield to the target and making him activate the spell... this however results on another problem, that the unit actually has to stop to activate the Mana Shield, thus resulting on all the original actions of the unit to be cancelled, and this won't do either :thdown:.
Now, the question is, how do i get this to work or how to i complety mitigate the damage from the unit?
Thanks in advance!
Well, pretty much what i need is an absorption spell that can be cast on any friendly unit... Now, i've tried several approaches to this and wasn't able to make them work the way i want to.
First i've tried the usual approach, the unit takes damage and it's instantly healed afterwards. But this results in the problem that if the unit takes more damage than it's own health pool, it will die before it can get healed. Since this is kinda the idea of the map, this won't do :thdown:.
So i've figured i had to use some kind of spell to mitigate all the damage, and then do the math using "Trigger - Add to PW Damage <gen> the event (Unit - PlayerClass[(Integer A)] Takes damage)" and only damage the player with the remaining damage.
Now the only spell i know that can do this is the mana shield. The problem is that the mana shield must be activated by the target and cannot be cast by another player. So the only way that i can do this is actually adding Mana Shield to the target and making him activate the spell... this however results on another problem, that the unit actually has to stop to activate the Mana Shield, thus resulting on all the original actions of the unit to be cancelled, and this won't do either :thdown:.
Now, the question is, how do i get this to work or how to i complety mitigate the damage from the unit?
Thanks in advance!