• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Need Help Creating an Ability

Status
Not open for further replies.
Level 7
Joined
Feb 26, 2005
Messages
210
I want to create a passive ability which activates when the unit with this ability is attacked and takes damage from a friendly unit. The attacking unit will increase its hit points by an amount proportional to the damage dealt. How do I do this?
 
Level 7
Joined
Feb 26, 2005
Messages
210
this is unrelated to the world editor help zone and should be moved to the "Request a Resource" Forum.
My mistake.
Current HP or max HP?
Current.
just take a copy of thorns aura, set damage to negative, add 900 range and that would be it, and yeah, change the buff description and icons.

EDIT: and set it to allied unit only.
That will not work. The targets aloud field only applies to the units which obtain the effects of the aura; not which attackers are hurt (or in this case healed) by it. The range field does not extend the effect to harm ranged units either; Thorns Aura is hard-coded to only affect melee attackers.
 
Level 18
Joined
Feb 28, 2009
Messages
1,970
So make that if unit is under attack,
conditions, that attacking unit has that ability (or has such a buff), that attacking unit is an ally, life of attacking unit not equal to max HP
then Set Life of Attacking Unit to damage taken

I`d make triggers, but I have other language version of WE.
 
Level 7
Joined
Feb 26, 2005
Messages
210
Trouble with that is two-fold.

First; the event 'A Unit is Attacked' will activate when the attack begins as opposed to when the damage is dealt. This is extremely problematic.

Second; the 'Damage Taken' is only in reference to 'A unit takes damage' event which can only be used for the 'specific unit event'.
 
Status
Not open for further replies.
Top