• 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.

[General] Instant aura buff change

Status
Not open for further replies.
Level 8
Joined
Apr 23, 2011
Messages
322
When you level up (or level down) an aura, the buff disappears and then appears again (with a higher level).Since I have some auras that change 3 times in a second (via trigger), I was wondering is it possible to change the buff instantly, when aura is levelled, without the buff disappearing for a short duration?

I think the problem is related to this too:
How to make aura buff disappear instantly when an aura carrier (Paladin with Devotion Aura) dies (or goes too far away)?
 
Level 5
Joined
Nov 30, 2012
Messages
200
Have you tried removing and adding the ability with triggers? I think that should work, unless the ability still seems to linger after it's gone.
 
Level 16
Joined
Aug 7, 2009
Messages
1,406
Told ya it wouldn't work, I had the required experience. You can always use dummy abilities that are cast to place the appropriate buffs, removing their buff and casting the spell on them again will cause its level to be refreshed instantly.
 
Level 8
Joined
Apr 23, 2011
Messages
322
Told ya it wouldn't work, I had the required experience. You can always use dummy abilities that are cast to place the appropriate buffs, removing their buff and casting the spell on them again will cause its level to be refreshed instantly.

I'm pretty sure there will be HELL LAGGGG since there will be about 300 units on the map all the time and creating 300 dummies every 0.33 sec to cast abilities on units...or maybe not...
 
Level 16
Joined
Aug 7, 2009
Messages
1,406
Why would you want to create 300 dummies, when one global dummy is enough, that's capable of casting things instantly? Just give it the dummy ability, make it so that it has zero cooldown and cast it.

Though I don't see why it's important to display the current level of the buff if it's changed 3 times a second.
 
Level 8
Joined
Apr 23, 2011
Messages
322
Well I think that is quite possible since auras I'm using could be replaced with spells.Now all I need is that trigger because at this moment I'm too tired to make one.I shall try tomorrow.(in about 15 hours...)

edit1:staring now...

edit2:yay it works!1 dummy casting works!except for the lagg...
  • Speed New Dummy
    • Events
      • Time - Every 0.75 seconds of game time
    • Conditions
    • Actions
      • Set AllunitsHealth = (Units in (Playable map area))
      • Unit Group - Pick every unit in AllunitsHealth and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Cripple) Equal to True
            • Then - Actions
              • Unit - Remove Cripple buff from (Picked unit)
              • Unit - Set level of 11111Cripple for Spell Breaker 0199 <gen> to (1 + ((100 - (Integer((Percentage mana of (Picked unit))))) / 5))
              • Unit - Order Spell Breaker 0199 <gen> to Undead Necromancer - Cripple (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_AllunitsHealth)
I don't thinks there is any leak, but maybe there is which is the main reason of lag.There is no lag if there is up to 20 units.
I shall try using about 20 units that will cast cripple on units with x1-x2% mana (unit1:units with 96-100% mana, unit2:units with 91-95, and so on...)
If someone has a better solution please replay.

edit3:new trigger (22 casters not 1), still lag
  • Speed New Dummy 20 units
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Set level of 11111Cripple for Spell Breaker 0207 <gen> to 1
      • Unit - Set level of 11111Cripple for Spell Breaker 0199 <gen> to 2
      • Unit - Set level of 11111Cripple for Spell Breaker 0201 <gen> to 3
      • Unit - Set level of 11111Cripple for Spell Breaker 0203 <gen> to 4
      • Unit - Set level of 11111Cripple for Spell Breaker 0204 <gen> to 5
      • Unit - Set level of 11111Cripple for Spell Breaker 0202 <gen> to 6
      • Unit - Set level of 11111Cripple for Spell Breaker 0200 <gen> to 7
      • Unit - Set level of 11111Cripple for Spell Breaker 0205 <gen> to 8
      • Unit - Set level of 11111Cripple for Spell Breaker 0208 <gen> to 9
      • Unit - Set level of 11111Cripple for Spell Breaker 0206 <gen> to 10
      • Unit - Set level of 11111Cripple for Spell Breaker 0210 <gen> to 11
      • Unit - Set level of 11111Cripple for Spell Breaker 0209 <gen> to 12
      • Unit - Set level of 11111Cripple for Spell Breaker 0211 <gen> to 13
      • Unit - Set level of 11111Cripple for Spell Breaker 0213 <gen> to 14
      • Unit - Set level of 11111Cripple for Spell Breaker 0212 <gen> to 15
      • Unit - Set level of 11111Cripple for Spell Breaker 0215 <gen> to 16
      • Unit - Set level of 11111Cripple for Spell Breaker 0214 <gen> to 17
      • Unit - Set level of 11111Cripple for Spell Breaker 0216 <gen> to 18
      • Unit - Set level of 11111Cripple for Spell Breaker 0218 <gen> to 19
      • Unit - Set level of 11111Cripple for Spell Breaker 0217 <gen> to 20
      • Unit - Set level of 11111Cripple for Spell Breaker 0219 <gen> to 21
      • Unit - Set level of 11111Cripple for Spell Breaker 0220 <gen> to 22
  • Speed New Dummy percent
    • Events
      • Time - Every 0.55 seconds of game time
    • Conditions
    • Actions
      • Set AllunitsHealth = (Units in (Playable map area))
      • Unit Group - Pick every unit in AllunitsHealth and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Moral Status ) Equal to True
              • (Integer((Percentage mana of (Picked unit)))) Equal to 100
            • Then - Actions
              • Unit - Remove Cripple buff from (Picked unit)
              • Unit - Order Spell Breaker 0207 <gen> to Undead Necromancer - Cripple (Picked unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) has buff Moral Status ) Equal to True
                  • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 96
                • Then - Actions
                  • Unit - Remove Cripple buff from (Picked unit)
                  • Unit - Order Spell Breaker 0199 <gen> to Undead Necromancer - Cripple (Picked unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) has buff Moral Status ) Equal to True
                      • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 91
                    • Then - Actions
                      • Unit - Remove Cripple buff from (Picked unit)
                      • Unit - Order Spell Breaker 0201 <gen> to Undead Necromancer - Cripple (Picked unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) has buff Moral Status ) Equal to True
                          • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 86
                        • Then - Actions
                          • Unit - Remove Cripple buff from (Picked unit)
                          • Unit - Order Spell Breaker 0203 <gen> to Undead Necromancer - Cripple (Picked unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Picked unit) has buff Moral Status ) Equal to True
                              • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 81
                            • Then - Actions
                              • Unit - Remove Cripple buff from (Picked unit)
                              • Unit - Order Spell Breaker 0204 <gen> to Undead Necromancer - Cripple (Picked unit)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Picked unit) has buff Moral Status ) Equal to True
                                  • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 76
                                • Then - Actions
                                  • Unit - Remove Cripple buff from (Picked unit)
                                  • Unit - Order Spell Breaker 0202 <gen> to Undead Necromancer - Cripple (Picked unit)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • ((Picked unit) has buff Moral Status ) Equal to True
                                      • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 71
                                    • Then - Actions
                                      • Unit - Remove Cripple buff from (Picked unit)
                                      • Unit - Order Spell Breaker 0200 <gen> to Undead Necromancer - Cripple (Picked unit)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • ((Picked unit) has buff Moral Status ) Equal to True
                                          • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 66
                                        • Then - Actions
                                          • Unit - Remove Cripple buff from (Picked unit)
                                          • Unit - Order Spell Breaker 0205 <gen> to Undead Necromancer - Cripple (Picked unit)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • ((Picked unit) has buff Moral Status ) Equal to True
                                              • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 61
                                            • Then - Actions
                                              • Unit - Remove Cripple buff from (Picked unit)
                                              • Unit - Order Spell Breaker 0208 <gen> to Undead Necromancer - Cripple (Picked unit)
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • ((Picked unit) has buff Moral Status ) Equal to True
                                                  • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 56
                                                • Then - Actions
                                                  • Unit - Remove Cripple buff from (Picked unit)
                                                  • Unit - Order Spell Breaker 0206 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                • Else - Actions
                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    • If - Conditions
                                                      • ((Picked unit) has buff Moral Status ) Equal to True
                                                      • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 51
                                                    • Then - Actions
                                                      • Unit - Remove Cripple buff from (Picked unit)
                                                      • Unit - Order Spell Breaker 0210 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                    • Else - Actions
                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                        • If - Conditions
                                                          • ((Picked unit) has buff Moral Status ) Equal to True
                                                          • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 46
                                                        • Then - Actions
                                                          • Unit - Remove Cripple buff from (Picked unit)
                                                          • Unit - Order Spell Breaker 0209 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                        • Else - Actions
                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                            • If - Conditions
                                                              • ((Picked unit) has buff Moral Status ) Equal to True
                                                              • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 41
                                                            • Then - Actions
                                                              • Unit - Remove Cripple buff from (Picked unit)
                                                              • Unit - Order Spell Breaker 0211 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                            • Else - Actions
                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                • If - Conditions
                                                                  • ((Picked unit) has buff Moral Status ) Equal to True
                                                                  • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 36
                                                                • Then - Actions
                                                                  • Unit - Remove Cripple buff from (Picked unit)
                                                                  • Unit - Order Spell Breaker 0213 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                • Else - Actions
                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                    • If - Conditions
                                                                      • ((Picked unit) has buff Moral Status ) Equal to True
                                                                      • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 31
                                                                    • Then - Actions
                                                                      • Unit - Remove Cripple buff from (Picked unit)
                                                                      • Unit - Order Spell Breaker 0212 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                      • -------- 15 DONE --------
                                                                    • Else - Actions
                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                        • If - Conditions
                                                                          • ((Picked unit) has buff Moral Status ) Equal to True
                                                                          • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 26
                                                                        • Then - Actions
                                                                          • Unit - Remove Cripple buff from (Picked unit)
                                                                          • Unit - Order Spell Breaker 0215 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                        • Else - Actions
                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                            • If - Conditions
                                                                              • ((Picked unit) has buff Moral Status ) Equal to True
                                                                              • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 21
                                                                            • Then - Actions
                                                                              • Unit - Remove Cripple buff from (Picked unit)
                                                                              • Unit - Order Spell Breaker 0214 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                            • Else - Actions
                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                • If - Conditions
                                                                                  • ((Picked unit) has buff Moral Status ) Equal to True
                                                                                  • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 16
                                                                                • Then - Actions
                                                                                  • Unit - Remove Cripple buff from (Picked unit)
                                                                                  • Unit - Order Spell Breaker 0216 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                                • Else - Actions
                                                                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                    • If - Conditions
                                                                                      • ((Picked unit) has buff Moral Status ) Equal to True
                                                                                      • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 11
                                                                                    • Then - Actions
                                                                                      • Unit - Remove Cripple buff from (Picked unit)
                                                                                      • Unit - Order Spell Breaker 0218 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                                    • Else - Actions
                                                                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                        • If - Conditions
                                                                                          • ((Picked unit) has buff Moral Status ) Equal to True
                                                                                          • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 6
                                                                                        • Then - Actions
                                                                                          • Unit - Remove Cripple buff from (Picked unit)
                                                                                          • Unit - Order Spell Breaker 0217 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                                        • Else - Actions
                                                                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                            • If - Conditions
                                                                                              • ((Picked unit) has buff Moral Status ) Equal to True
                                                                                              • (Integer((Percentage mana of (Picked unit)))) Greater than or equal to 1
                                                                                            • Then - Actions
                                                                                              • Unit - Remove Cripple buff from (Picked unit)
                                                                                              • Unit - Order Spell Breaker 0219 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                                            • Else - Actions
                                                                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                                                                • If - Conditions
                                                                                                  • ((Picked unit) has buff Moral Status ) Equal to True
                                                                                                  • (Integer((Percentage mana of (Picked unit)))) Less than 1
                                                                                                • Then - Actions
                                                                                                  • Unit - Remove Cripple buff from (Picked unit)
                                                                                                  • Unit - Order Spell Breaker 0220 <gen> to Undead Necromancer - Cripple (Picked unit)
                                                                                                • Else - Actions
      • Custom script: call DestroyGroup (udg_AllunitsHealth)
I guess this could be moved to triggers & scripts...
 
Last edited:
Level 8
Joined
Apr 23, 2011
Messages
322
You do know right, you can use ONE SINGLE DUMMY UNIT in your map, to replace all dummy casting - provided that the spells have instant effect ?

Yes I do.I suppose this is the trigger (from before)
  • Speed New Dummy
    • Events
      • Time - Every 0.75 seconds of game time
    • Conditions
    • Actions
      • Set AllunitsHealth = (Units in (Playable map area))
      • Unit Group - Pick every unit in AllunitsHealth and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Cripple) Equal to True
            • Then - Actions
              • Unit - Remove Cripple buff from (Picked unit)
              • Unit - Set level of 11111Cripple for Spell Breaker 0199 <gen> to (1 + ((100 - (Integer((Percentage mana of (Picked unit))))) / 5))
              • Unit - Order Spell Breaker 0199 <gen> to Undead Necromancer - Cripple (Picked unit)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_AllunitsHealth)
The problem is that it lags a lot, so I need another way to do it.So I thought more dummies=less lag.I was wrong...
Or my trigger is bad and could be done better.I need either my trigger to be fixed or another way to slow all units on the map depending on their mana %.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
probably because your enuming every unit on the map every 0.75 seconds... try only doing the ones within 900-1000-whatever of your aura ppl
 
Level 8
Joined
Apr 23, 2011
Messages
322
probably because your enuming every unit on the map every 0.75 seconds... try only doing the ones within 900-1000-whatever of your aura ppl

I Dummies casting slow:
every 0.75 sec=lag on every 0.75 sec
every 5 sec=lag on every 5 sec...

II Slow aura (every unit has its own aura affecting only itself):
can't be instantly changed
unit is slow (because of aura)
=>loses more mana=aura has to be levelled up (aura stronger=stronger slow)
=>unit's speed is "normalised" for 1 sec and then slower than before

III any other way?
 
Level 16
Joined
Aug 7, 2009
Messages
1,406
Or don't enum units, but create a static linked list instead. Any time a non-dummy unit enters the map, add it to the list, and remove it upon leaving the map. You can easily iterate over the list every 0.75 seconds, and I'm pretty sure it'll be faster.

I'm not sure if it'll make things that much better as casting that many spells so frequently fires a lot of event, but I think it's worth a try.
 
Status
Not open for further replies.
Top