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

Heal Passive Spell

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
something similar to this:
  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Hero = (Last created unit)
      • Set VariableSet MaxHp_Limit = 100
  • Heal
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxHp_Counter Less than MaxHp_Limit
        • Then - Actions
          • Set VariableSet MaxHp_Counter = (MaxHp_Counter + 1)
          • Unit - Set Max HP of Hero to ((Max HP of Hero) + 1)
        • Else - Actions
      • Unit - Set life of Hero to ((Life of Hero) + 1.00)
 
Level 7
Joined
Sep 19, 2020
Messages
190
something similar to this:
  • Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Hero = (Last created unit)
      • Set VariableSet MaxHp_Limit = 100
  • Heal
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaxHp_Counter Less than MaxHp_Limit
        • Then - Actions
          • Set VariableSet MaxHp_Counter = (MaxHp_Counter + 1)
          • Unit - Set Max HP of Hero to ((Max HP of Hero) + 1)
        • Else - Actions
      • Unit - Set life of Hero to ((Life of Hero) + 1.00)
This trigger change max hp?
 
Level 9
Joined
Mar 26, 2017
Messages
376
If the unit you intend to use this for doesn't consume mana, you could give it a mana bar and add mana shield.
Give it 1 mana regen per second, 1 mana for 1 damage, order to enable it, remove the animation, and hide the 'turn off' button.

If this is no option, another way is to save a variable for the unit that gains +1 every second. Then use a damage engine to subtract that variable from the damage received.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Add an ability to the unit that increases Hit Points. Not sure if the Levels work on the Hp Bonus abilities though, because some Item Abilities are buggy. You could also try Upgrades with multiple levels.

Pretty simple concept, every 1.00 second you increase the Level of the ability/upgrade, increasing the unit's hp by 1.
 
Status
Not open for further replies.
Top