Rect Regeneration?

ImmortaL_GoD

New Member
Reaction score
4
Need help with making a rect targeted regeneration, i.e. units in a rect get a certain life regeneration ability, but I'm having trouble removing it if they're not in it.
 

ImmortaL_GoD

New Member
Reaction score
4
Ok, got it to work, except it doesn't seem to be adding the buff as well:

Trigger:
  • Essence of Darkness
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (|c00FFFF00Moria 0391 <gen> is alive) Equal to True
    • Actions
      • Set temp_group = (Units in Essence of Darkness <gen>)
      • Unit Group - Pick every unit in temp_group and do (Actions)
        • Loop - Actions
          • Set varUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of varUnit) Less than (Max life of varUnit)
              • (varUnit belongs to an ally of Player 8 (Pink)) Equal to True
            • Then - Actions
              • Set tempInteger = (Integer((Life of varUnit)))
              • Unit - Set life of varUnit to ((Real(tempInteger)) + 4.00)
              • Custom script: call UnitAddAbility(udg_varUnit,'B02A')
            • Else - Actions
              • Do nothing
      • Custom script: call DestroyGroup (udg_temp_group)

Thanks to CokeMonkey.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
The only way to add a buff is casting a spell that gives it.

Alternatively, the ability "slow aura (tornado)" can be added... (for show only).


> Set tempInteger = (Integer((Life of varUnit)))

Well, might just as well use "life of" directly, without that variable.

And, if you used "units in ragion matching", you could put all conditions there and simplify that loop.


"Do nothing", as it says, does strictly nothing. Just remove it.
 

ImmortaL_GoD

New Member
Reaction score
4
And, if you used "units in ragion matching", you could put all conditions there and simplify that loop.
Not entirely sure what function you're referring to (and where to place it). =/

Also, so do you think there's any way I could put that regen on there with the buff on there too (and have it disappear when the unit leaves the rect)?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I think he means that you should just implement these line in the "temp_group" using matching:
Trigger:
  • (Life of varUnit) Less than (Max life of varUnit)
    • (varUnit belongs to an ally of Player 8 (Pink)) Equal to True


With other words, use this line:
Trigger:
  • Set Temp_Group = (Units in Essence of Darkness <gen> matching (((Life of (Matching unit)) Less than (Max life of (Matching unit))) and (((Matching unit) belongs to an ally of Player 8 (Pink)) Equal to True)))
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top