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

[Trigger] Aura 20% Max Health

Status
Not open for further replies.
Level 5
Joined
Jul 17, 2010
Messages
140
I have this effect but is does not add the x% Hp
It work fine if it adds flat hp
  • Health Aura Copy
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Priest[0] and do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 900.00 of (Position of (Picked unit))) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Health Aura ) Equal to True
                • Then - Actions
                  • Unit - Add Dummy Item (+1) to (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of Dummy Item (+1) for (Picked unit)) Equal to 1
                    • Then - Actions
                      • Unit - Set life of (Picked unit) to (((Max life of (Picked unit)) x 0.20) + (Life of (Picked unit)))
                    • Else - Actions
                • Else - Actions
      • Unit Group - Pick every unit in (Units within 1000000000.00 of (Center of (Playable map area))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Health Aura ) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Dummy Item (+1) for (Picked unit)) Equal to 1
                • Then - Actions
                  • Unit - Remove Dummy Item (+1) from (Picked unit)
                • Else - Actions
                  • Do nothing
            • Else - Actions
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
What exactly do you want to accomplish?

It seems like you are trying to increase the maximum hit points of units affected by the aura and you use a dummy ability to not increase their hit points multiple times.
First of all instead of adding abilities use a unit group to keep track of the units, it should be faster.
Why do you use units within 1000000000000 ? Just use units in playable map.

You can't easily increase max hp of unit. The most common solution is to abuse a bug with adding and removing different levels of abilities that increase maximum health.
Here is a system that uses this bug: [System] Bonus Mod & SetUnitMaxState
https://www.hiveworkshop.com/threads/system-bonus-mod-setunitmaxstate.65622/
Don't use "do nothing", because it does nothing. Just leave it empty. It's a wasted function call.

There are leaks in your trigger: Things That Leak
 
Level 5
Joined
Jul 17, 2010
Messages
140
What exactly do you want to accomplish?

It seems like you are trying to increase the maximum hit points of units affected by the aura and you use a dummy ability to not increase their hit points multiple times.
First of all instead of adding abilities use a unit group to keep track of the units, it should be faster.
Why do you use units within 1000000000000 ? Just use units in playable map.

You can't easily increase max hp of unit. The most common solution is to abuse a bug with adding and removing different levels of abilities that increase maximum health.
Here is a system that uses this bug: [System] Bonus Mod & SetUnitMaxState
Don't use "do nothing", because it does nothing. Just leave it empty. It's a wasted function call.

There are leaks in your trigger: Things That Leak


Thanks for the feedback
 
Status
Not open for further replies.
Top