• 🏆 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!

[Solved] Healing by Percent

Status
Not open for further replies.
Level 10
Joined
May 8, 2009
Messages
253
  • Actions
    • Set LifeValue = (0.20 x (Life of (YourHero)))
    • Unit - Set life of (YourHero) to ((Life of (YourHero)) + LifeValue)
Now you might want to add this in case the healing should restore his entire life (without that, its health won't fully replenish)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Life of (YourHero)) +LifeValue) Greater than or equal to (Max life of (YourHero))
    • Then - Actions
      • Unit - Set life of (YourHero) to (Max life of (YourHero))
    • Else - Actions
 
Status
Not open for further replies.
Top