• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to trigger a healing ability at the cost of casters health?

Status
Not open for further replies.
Level 5
Joined
Mar 26, 2020
Messages
66
HI everyone, new member here but a subscriber last year ( i just didnt create an acc before lol )

I have some experience of using triggers but i find this confusing and hard
EX: ability Holy Light and instead of mana cost, it will use the health of the caster to heal/damage target unit~
 
Level 28
Joined
Feb 18, 2014
Messages
3,579
  • Holy Light
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) belongs to an ally of (Owner of (Casting unit))) Equal to TRUE
        • Then - Actions
          • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) - (200.00 x (Real((Level of Holy Light for (Casting unit))))))
        • Else - Actions
          • Unit - Set life of (Casting unit) to ((Life of (Casting unit)) - (100.00 x (Real((Level of Holy Light for (Casting unit))))))
 
Last edited:
Status
Not open for further replies.
Top