• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Heal Passive Spell

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
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)
 
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 10
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 73
Joined
Aug 10, 2018
Messages
7,877
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