• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Request a Trigger

Status
Not open for further replies.
Look at the item ability Item Permanent Life Gain.

Create three copies of it, one with +100, one with +10 and one with +1 for example.

Then create three different items (use manual of health as the base item), Manual of +100 health, +10 health and +1 health and give those abilites to them.

Then you can use this trigger:

  • Untitled Trigger 003
    • Events
      • Unit - A unit enters Region 000 <gen>
    • Conditions
    • Actions
      • Set Temp_Integer_1 = 153
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set Temp_Integer_1 = (Temp_Integer_1 - 100)
          • Hero - Create Manual of Health 100 and give it to (Triggering unit)
          • Item - Remove (Last created item)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_1 Less than 100
            • Then - Actions
              • For each (Integer B) from 1 to 10, do (Actions)
                • Loop - Actions
                  • Set Temp_Integer_1 = (Temp_Integer_1 - 10)
                  • Hero - Create Manual of Health 10 and give it to (Triggering unit)
                  • Item - Remove (Last created item)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Temp_Integer_1 Less than 10
                    • Then - Actions
                      • For each (Integer loopA) from 1 to 10, do (Actions)
                        • Loop - Actions
                          • Set Temp_Integer_1 = (Temp_Integer_1 - 1)
                          • Hero - Create Manual of Health 1 and give it to (Triggering unit)
                          • Item - Remove (Last created item)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Temp_Integer_1 Equal to 0
                            • Then - Actions
                              • Skip remaining actions
                            • Else - Actions
                    • Else - Actions
            • Else - Actions
If it's temporary bonus, just save how many of each items you created for the hero.

Create three items with -100, -10 and -1 health bonuses. Click shift + Enter when setting negative values.

Then when the health should be lost, create three loops and give the unit the negative tomes.
 
Using items is a bad idea, they don't get removed after use and leak.

Instead use "+HP bug". The ability that permanently increases hero HP ("Item hero health bonus" or something like that) only modifies HP on add/remove, not when it changes level. So you can make such ability that adds +11 HP on first level, +1 on second and then add it (hero gets +11HP), set it to level 2 (no change) and remove it (hero loses 1 HP).
That way you can increase HP permanently (also works for the according mana bonus ability)
 
Status
Not open for further replies.
Back
Top