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

[Solved] Attack Speed or Damage Aura for ranged units and on/off ability

Status
Not open for further replies.
Level 6
Joined
Jul 23, 2018
Messages
243
Hello hivers, what I have is a hero, learning an ability which can switch between Trueshot Aura and Celeritus Aura. I do not know any aura ability that gives extra attack speed so I used an item ability from gloves of haste and made it a normal ability, then I have the triggers detect if a unit has the attack speed buff from Celeritus Aura, it will add the glove of haste ability to the unit. I am using Bribe's Unit Indexer to make the ability MUI. Forgot to mention that only ranged units receive the buff, not both melee and ranged. However, I have a few problems with my abilities and triggers.
Solved/Unsolved
1) I used on/off abilities like mana shield and immolation but for some reasons it still keeps the buff that holds the model of green fire ball or blue oval shape shield around the hero although I cleared out the buff from the abilities. Solved by me (I simply used Defend or Magic Defense)
2) For Celeritus Aura, the unit did not get the ability, I think there's some problems in "Atk Speed Aura check"

Damcele is combination of Damnun and Celeritus
  • Damcele Aura Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Learned Hero Skill) Equal to Damcele Aura (Archer Queen)
          • (Learned Hero Skill) Equal to Mana Shield AR
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Mana Shield AR for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Celeritas Aura (Archer Queen) for (Triggering unit)) Greater than 0
        • Then - Actions
          • Unit - Set level of Celeritas Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
        • Else - Actions
          • Unit - Add Trueshot Aura (Archer Queen) to (Triggering unit)
          • Unit - For (Triggering unit), Ability Trueshot Aura (Archer Queen), Hide ability: True
          • Unit - Set level of Trueshot Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
  • Damcele Aura Cast
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(immolation))
          • (Issued order) Equal to (Order(manashieldon))
          • (Issued order) Equal to (Order(unimmolation))
          • (Issued order) Equal to (Order(manashieldoff))
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Archer Queen
          • (Unit-type of (Triggering unit)) Equal to Archer Queen (AI)
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Damcele Aura (Archer Queen) for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Issued order) Equal to (Order(immolation))
              • (Issued order) Equal to (Order(manashieldon))
        • Then - Actions
          • Unit - Remove Trueshot Aura (Archer Queen) from (Triggering unit)
          • Unit - Add Celeritas Aura (Archer Queen) to (Triggering unit)
          • Unit - For (Triggering unit), Ability Celeritas Aura (Archer Queen), Hide ability: True
          • Unit - Set level of Celeritas Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
        • Else - Actions
          • Unit - Remove Celeritas Aura (Archer Queen) from (Triggering unit)
          • Unit - Add Trueshot Aura (Archer Queen) to (Triggering unit)
          • Unit - For (Triggering unit), Ability Trueshot Aura (Archer Queen), Hide ability: True
          • Unit - Set level of Trueshot Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
  • Atk Speed Aura check
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • -------- I made five 5 different buffs --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Celeritas Aura Lvl 1) Equal to True
        • Then - Actions
          • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
          • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) has buff Celeritas Aura Lvl 2) Equal to True
            • Then - Actions
              • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
              • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Celeritas Aura Lvl 3) Equal to True
                • Then - Actions
                  • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
                  • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 3
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Triggering unit) has buff Celeritas Aura Lvl 4) Equal to True
                    • Then - Actions
                      • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
                      • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 4
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Triggering unit) has buff Celeritas Aura Lvl 5) Equal to True
                        • Then - Actions
                          • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
                          • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 5
                        • Else - Actions
                          • Unit - Remove Attack Speed Bonus (Archer Queen) from (Triggering unit)
 
Last edited:
Level 6
Joined
Jul 23, 2018
Messages
243
Thanks a lot
Edit: Your solution did not solved my second problem but I still appreciate your help.
ait what about the ability, they still keep the original model although I cleared everything. There are 2 abilities and they are based on immolation and mana shield. Is there on/off ability which has no model at all or how to completely remove buff from those abilities I just mentioned? I tried using channel ability with a dummy ability but casting too fast will cause the trigger to be buggy. And how do I make endurance aura to affect ranged unit only?
 
Last edited:
Level 24
Joined
Jun 26, 2020
Messages
1,850
  • Atk Speed Aura check
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • -------- I made five 5 different buffs --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Celeritas Aura Lvl 1) Equal to True
        • Then - Actions
          • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
          • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) has buff Celeritas Aura Lvl 2) Equal to True
            • Then - Actions
              • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
              • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering unit) has buff Celeritas Aura Lvl 3) Equal to True
                • Then - Actions
                  • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
                  • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 3
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Triggering unit) has buff Celeritas Aura Lvl 4) Equal to True
                    • Then - Actions
                      • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
                      • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 4
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Triggering unit) has buff Celeritas Aura Lvl 5) Equal to True
                        • Then - Actions
                          • Unit - Add Attack Speed Bonus (Archer Queen) to (Triggering unit)
                          • Unit - Set level of Attack Speed Bonus (Archer Queen) for (Triggering unit) to 5
                        • Else - Actions
                          • Unit - Remove Attack Speed Bonus (Archer Queen) from (Triggering unit)
Why did you use "Triggering Unit" In this trigger if the Event doesn't includes a unit?, I think this is the problem.
PD: I recomend use "For (Integer A)".
 
Level 6
Joined
Jul 23, 2018
Messages
243
I'm terribly sorry, I cannot see the point at doing that. I've only used WE for 5 months so I'm a noob. I thought of what are you doing with that actually. I don't know if this improves what part my trigger is missing. Then what about with detecting units who have the buff? Do I have to include the ranged units to the trigger?
 
Level 24
Joined
Jun 26, 2020
Messages
1,850
I'm terribly sorry, I cannot see the point at doing that. I've only used WE for 5 months so I'm a noob. I thought of what are you doing with that actually. I don't know if this improves what part my trigger is missing. Then what about with detecting units who have the buff? Do I have to include the ranged units to the trigger?
Ok I see, just assing your unit to a variable, and change those "Triggering Unit" for that variable.
 
Level 6
Joined
Jul 23, 2018
Messages
243
So I would have something like this
  • Damcele Aura check
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • ((Triggering unit) is A ranged attacker) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) has buff Celeritas Aura Lvl 1) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 2) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 3) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 4) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 5) Equal to True
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set CeleUnit[CV] = (Triggering unit)
      • Unit - Add Animate Dead (For Dummy,Un) to CeleUnit[CV]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CeleUnit[CV] has buff Celeritas Aura Lvl 1) Equal to True
        • Then - Actions
          • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
          • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CeleUnit[CV] has buff Celeritas Aura Lvl 2) Equal to True
            • Then - Actions
              • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
              • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CeleUnit[CV] has buff Celeritas Aura Lvl 3) Equal to True
                • Then - Actions
                  • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
                  • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 3
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (CeleUnit[CV] has buff Celeritas Aura Lvl 4) Equal to True
                    • Then - Actions
                      • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
                      • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 4
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (CeleUnit[CV] has buff Celeritas Aura Lvl 5) Equal to True
                        • Then - Actions
                          • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
                          • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 5
                        • Else - Actions
                          • Unit - Remove Attack Speed Bonus (Archer Queen) from CeleUnit[CV]
That animate dead there is to know did the unit get the ability or not. I tried and it did not work
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,502
So I would have something like this
  • Damcele Aura check
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
      • ((Triggering unit) is A ranged attacker) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) has buff Celeritas Aura Lvl 1) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 2) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 3) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 4) Equal to True
          • ((Triggering unit) has buff Celeritas Aura Lvl 5) Equal to True
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set CeleUnit[CV] = (Triggering unit)
      • Unit - Add Animate Dead (For Dummy,Un) to CeleUnit[CV]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CeleUnit[CV] has buff Celeritas Aura Lvl 1) Equal to True
        • Then - Actions
          • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
          • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CeleUnit[CV] has buff Celeritas Aura Lvl 2) Equal to True
            • Then - Actions
              • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
              • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 2
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CeleUnit[CV] has buff Celeritas Aura Lvl 3) Equal to True
                • Then - Actions
                  • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
                  • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 3
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (CeleUnit[CV] has buff Celeritas Aura Lvl 4) Equal to True
                    • Then - Actions
                      • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
                      • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 4
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (CeleUnit[CV] has buff Celeritas Aura Lvl 5) Equal to True
                        • Then - Actions
                          • Unit - Add Attack Speed Bonus (Archer Queen) to CeleUnit[CV]
                          • Unit - Set level of Attack Speed Bonus (Archer Queen) for CeleUnit[CV] to 5
                        • Else - Actions
                          • Unit - Remove Attack Speed Bonus (Archer Queen) from CeleUnit[CV]
That animate dead there is to know did the unit get the ability or not. I tried and it did not work
What you're doing doesn't make any sense because there is no Triggering unit in that Event. Here's how Events work:

There's Events and there's Event Responses. Event Responses are exactly as they sound, a response to an Event. You can only reference Event Responses that are related to your Event inside of your trigger.

Here are some examples:

Event: A unit dies -> Event Response: Dying unit

Event: A unit enters a region -> Event Response: Entering unit

Event: A unit gains a level -> Event Response: Leveling hero

You can almost think of it like Blizzard is assigning variables for you to use (Dying unit = Unit variable, Entering unit = Unit variable, etc). Only some of these variables are assigned in each trigger, which depends on the Event(s). This makes sense because there is no Dying unit for instance in the Event A unit enters a region, so Dying unit won't be assigned to anything and if you try to reference it you'll see that it won't work.

The Event you're using, Time - Every 0.50 seconds of game time has no Event Responses related to Units. That Event offers zero Event Responses to use.

Important side note:
You can also use the Event Response: Triggering unit in every single Event that involves a Unit like the Events I listed above. It's highly recommended to do so whenever possible as Triggering unit has a special property about it that make it more useful than the other Event Responses. That property being that it doesn't get unassigned (lost) after using a Wait action.

!!!!!!!!!!!!!!!!!!!!!!!!!!
And I triggered an Aura effect that you can use. Unfortunately, it looks like you're using an older version of Warcraft 3 so you'll have to recreate it based on my triggers:
  • Celerity Aura Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Celerity Aura (Hero)
      • (Level of Celerity Aura (Hero) for (Triggering unit)) Equal to 1
    • Actions
      • Unit Group - Add (Triggering unit) to Celerity_SourceGroup
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Celerity Aura Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Celerity Aura Loop <gen>
        • Else - Actions
  • Celerity Aura Revive
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
      • (Level of Celerity Aura (Hero) for (Triggering unit)) Greater than or equal to 1
    • Actions
      • Unit Group - Add (Triggering unit) to Celerity_SourceGroup
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Celerity Aura Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Celerity Aura Loop <gen>
        • Else - Actions
  • Celerity Aura Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Celerity_TargetGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet Celerity_Target = (Picked unit)
          • Unit - Remove Celerity Aura (Attack Speed) from Celerity_Target
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity_Target is in Celerity_SourceGroup.) Equal to False
            • Then - Actions
              • Special Effect - Destroy Celerity_Sfx[(Custom value of Celerity_Target)]
            • Else - Actions
      • -------- --------
      • Unit Group - Pick every unit in Celerity_SourceGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet Celerity_Source = (Picked unit)
          • Set VariableSet Celerity_Level = (Level of Celerity Aura (Hero) for Celerity_Source)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity_Source is alive) Equal to True
              • Celerity_Level Greater than 0
            • Then - Actions
              • Set VariableSet Celerity_Point = (Position of Celerity_Source)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 900.00 of Celerity_Point.) and do (Actions)
                • Loop - Actions
                  • Set VariableSet Celerity_Target = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Celerity_Target is alive) Equal to True
                      • (Celerity_Target belongs to an ally of (Owner of Celerity_Source).) Equal to True
                      • (Celerity_Target is A structure) Equal to False
                      • (Celerity_Target is Mechanical) Equal to False
                      • (Celerity_Target is A melee attacker) Equal to False
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Celerity Aura (Attack Speed) for Celerity_Target) Equal to 0
                        • Then - Actions
                          • Unit - Add Celerity Aura (Attack Speed) to Celerity_Target
                          • Unit - Set level of Celerity Aura (Attack Speed) for Celerity_Target to Celerity_Level
                          • Unit Group - Add Celerity_Target to Celerity_TargetGroup
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Celerity_Target is in Celerity_SourceGroup.) Equal to False
                            • Then - Actions
                              • Special Effect - Create a special effect attached to the origin of Celerity_Target using Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
                              • Set VariableSet Celerity_Sfx[(Custom value of Celerity_Target)] = (Last created special effect)
                            • Else - Actions
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Celerity_Level Greater than (Level of Celerity Aura (Attack Speed) for Celerity_Target)
                            • Then - Actions
                              • Unit - Set level of Celerity Aura (Attack Speed) for Celerity_Target to Celerity_Level
                            • Else - Actions
                      • Unit - For Celerity_Target, Ability Celerity Aura (Attack Speed), Disable ability: True, Hide UI: False
                      • Unit - For Celerity_Target, Ability Celerity Aura (Attack Speed), Disable ability: False, Hide UI: False
                    • Else - Actions
              • Custom script: call RemoveLocation (udg_Celerity_Point)
            • Else - Actions
              • Unit Group - Remove Celerity_Source from Celerity_SourceGroup.
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Celerity_SourceGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off Celerity Aura Loop <gen>
        • Else - Actions
Abilities:
Celerity Aura (Attack Speed) = Unit ability based on Endurance Aura. Has 5 levels. Targets Allowed: Self. This is what applies the buff/attack speed. Remove the Art - Target from the ability and it's buff, as the blue aura effect will be done through triggers. Also, make sure to hide it's button, you can do this in the Object Editor by setting it's Button Position to 0,-11. See attached picture for an example.

Celerity Aura (Hero) = Hero ability based on Endurance Aura. Has 5 levels. Targets Allowed: None. This does nothing besides serve as a tooltip/ability to learn. It also provides the Aura art to the origin of the Hero (the actual Aura art, not the blue origin effect).

Variables:
Celerity_Source = Unit
Celerity_Target = Unit
Celerity_SourceGroup = Unit Group
Celerity_TargetGroup = Unit Group
Celerity_Level = Integer
Celerity_Point = Point
Celerity_Sfx = Special Effect (Array)

The Celerity Aura Loop trigger should be Initially OFF, as we turn it on when a living unit has the Celerity ability, and turn it off when there are no living units with the ability.
 

Attachments

  • Celerity Aura v.1.w3m
    24.9 KB · Views: 17
  • Hide Button Example.png
    Hide Button Example.png
    202.8 KB · Views: 53
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,502
Do units get removed from group when they die?
Yep, every 0.50 seconds it removes ALL units from the Celerity_TargetGroup. Then it searches for nearby eligible targets (alive, allied, ranged + any extra classifications you wish to add) to add into the group.

Celerity_SourceGroup contains the Heroes that have the Celerity ability. They're removed from the group temporarily while dead, and added back once they Revive.

If your map uses a custom Revive system then you should adjust the Revive trigger I made to work for your system. It's a simple trigger, you simply check if your "Reviving" unit has the Celerity ability (Level >= 1) and if yes, add it to Celerity_SourceGroup, then check if the Celerity Loop trigger is On, and if no, turn it On.

Edit: I thought you were talking about my triggers. Units will not be removed from a unit group when killed. You'll have to handle that yourself. (And if you use my triggers know that I do indeed remove them)
 
Last edited:
Level 24
Joined
Jun 26, 2020
Messages
1,850
@TheFireMage I told you
No, triggering unit its the unit who runs the trigger (Depends only of the event)
Also the game says "Envent Reaction" when you select triggering unit, buy well I think Uncle gave you a good explanation of that.

When I said
just assing your unit to a variable, and change those "Triggering Unit" for that variable.
I reffer in another trigger because what you did its practicaly the same as before.
 
Level 6
Joined
Jul 23, 2018
Messages
243
Is there a way to completely remove the buff? After I cleared out the buff, the original buff still remains, unless I put another buff
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,502
Is there a way to completely remove the buff? After I cleared out the buff, the original buff still remains, unless I put another buff
It functions exactly as standard auras do. The buff lingers for ~2 seconds after getting out of range.

If you want the buff to no longer linger you can remove it after this line:
  • Unit - Remove Celerity Aura (Attack Speed) from Celerity_Target
Then -> Remove X buff from Celerity_Target

Unless i'm misunderstanding your problem/question.
 
Level 6
Joined
Jul 23, 2018
Messages
243
It functions exactly as standard auras do. The buff lingers for ~2 seconds after getting out of range.

If you want the buff to no longer linger you can remove it after this line:
  • Unit - Remove Celerity Aura (Attack Speed) from Celerity_Target
Then -> Remove X buff from Celerity_Target

Unless i'm misunderstanding your problem/question.
It's not about the triggers, it's about the ability stats - buff
I cleared out the buff but the original buff remains
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,502
The alternative is to avoid using abilities that use buffs.

In this case you can replace Celerity Aura (Attack Speed) with an Item ability that adds attack speed (I think you were originally doing this).

Keep in mind that Item abilities sometimes have issues with setting their levels, but Attack Speed might be one of the exceptions that does work.

If it doesn't work then the trigger can be modified to use 5 separate Item abilities that represent levels 1 to 5.
 
Level 6
Joined
Jul 23, 2018
Messages
243
Took me a while to fuse your triggers with mine for aura-toggle ability, and here it is

  • Damcele Aura Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Damcele Aura
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Damcele Aura for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attack Speed Bonus (Celerity Aura) for (Triggering unit)) Greater than 0
        • Then - Actions
          • Unit Group - Add (Learning Hero) to Celerity_SourceGroup
          • Unit - Set level of Celerity Aura (Dummy) for (Triggering unit) to AbilLvl[CV]
          • Unit - Set level of Attack Speed Bonus (Celerity Aura) for (Triggering unit) to AbilLvl[CV]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity Aura Loop <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on Celerity Aura Loop <gen>
            • Else - Actions
        • Else - Actions
          • Unit - Add Trueshot Aura (Archer Queen) to (Triggering unit)
          • Unit - Set level of Trueshot Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
  • Damcele Aura Toggle
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(defend))
          • (Issued order) Equal to (Order(undefend))
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Archer Queen
          • (Unit-type of (Triggering unit)) Equal to Archer Queen (AI)
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Damcele Aura for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(defend))
        • Then - Actions
          • Unit - Remove Trueshot Aura (Archer Queen) from (Triggering unit)
          • Unit Group - Add (Learning Hero) to Celerity_SourceGroup
          • Unit - Add Celerity Aura (Dummy) to (Triggering unit)
          • Unit - Add Attack Speed Bonus (Celerity Aura) to (Triggering unit)
          • Unit - Set level of Celerity Aura (Dummy) for (Triggering unit) to AbilLvl[CV]
          • Unit - Set level of Attack Speed Bonus (Celerity Aura) for (Triggering unit) to AbilLvl[CV]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity Aura Loop <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on Celerity Aura Loop <gen>
            • Else - Actions
        • Else - Actions
          • Unit - Remove Celerity Aura (Dummy) from (Triggering unit)
          • Unit - Remove Attack Speed Bonus (Celerity Aura) from (Triggering unit)
          • Unit - Add Trueshot Aura (Archer Queen) to (Triggering unit)
          • Unit - Set level of Trueshot Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
  • Celerity Aura Revive
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
      • (Level of Attack Speed Bonus (Celerity Aura) for (Triggering unit)) Greater than 0
    • Actions
      • Unit Group - Add (Learning Hero) to Celerity_SourceGroup
  • Celerity Aura Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • -------- This trigger should be initially OFF --------
      • Unit Group - Pick every unit in Celerity_TargetGroup and do (Actions)
        • Loop - Actions
          • Set Celerity_Target = (Picked unit)
          • Unit - Remove Attack Speed Bonus (Celerity Aura) from Celerity_Target
      • Unit Group - Pick every unit in Celerity_SourceGroup and do (Actions)
        • Loop - Actions
          • Set Celerity_Source = (Picked unit)
          • Set Celerity_Level = (Level of Celerity Aura (Dummy) for Celerity_Source)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity_Source is alive) Equal to True
              • Celerity_Level Greater than 0
            • Then - Actions
              • Set Celerity_Point = (Position of Celerity_Source)
              • Set CeleLvl_Real = (Real(Celerity_Level))
              • Set Celerity_AoE = (825.00 + (75.00 x CeleLvl_Real))
              • Unit Group - Pick every unit in (Units within Celerity_AoE of Celerity_Point) and do (Actions)
                • Loop - Actions
                  • Set Celerity_Target = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Celerity_Target is alive) Equal to True
                      • (Celerity_Target belongs to an ally of (Owner of Celerity_Source)) Equal to True
                      • (Celerity_Target is A structure) Equal to False
                      • (Celerity_Target is Mechanical) Equal to False
                      • (Celerity_Target is A melee attacker) Equal to False
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Attack Speed Bonus (Celerity Aura) for Celerity_Target) Equal to 0
                        • Then - Actions
                          • Unit - Add Attack Speed Bonus (Celerity Aura) to Celerity_Target
                          • Unit - Set level of Attack Speed Bonus (Celerity Aura) for Celerity_Target to Celerity_Level
                          • Unit Group - Add Celerity_Target to Celerity_TargetGroup
                        • Else - Actions
                      • Unit - For Celerity_Target, Ability Attack Speed Bonus (Celerity Aura), Disable ability: True, Hide UI: False
                      • Unit - For Celerity_Target, Ability Attack Speed Bonus (Celerity Aura), Disable ability: False, Hide UI: False
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_Celerity_Point)
            • Else - Actions
              • Unit Group - Remove Celerity_Source from Celerity_SourceGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Celerity_SourceGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off Celerity Aura Loop <gen>
        • Else - Actions

Changes

Abilities:

- Damcele Aura = a toggle ability based on "Defend" for switching aura.
- Celerity Aura (Dummy) = ability based on "Trueshot Aura" to replace your "Celerity_Sfx (array)" variable because I don't feel like it is needed.
- Attack Speed Bonus (Celerity Aura) = Item ability that adds attack speed you mentioned earlier.

Variables:

All variables are kept the same except for Celerity_Sfx as I said earlier and a new variable group.
Celerity_RangeGroup (array) = because I want the range of my ability increases as its level increases, so have to create it and make it array.


 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,502
A good optimization to your trigger would be to use a Real variable to represent the AoE per level instead of 5 separate Unit Groups.
  • Set Celerity_AoE = (825 + (75 * Celerity_Level)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in units within Celerity_AoE range of Celerity_Point and do (Actions)
 
Level 6
Joined
Jul 23, 2018
Messages
243
A good optimization to your trigger would be to use a Real variable to represent the AoE per level instead of 5 separate Unit Groups.
  • Set Celerity_AoE = (825 + (75 * Celerity_Level)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in units within Celerity_AoE range of Celerity_Point and do (Actions)
Why real variables
Edit: Wait, I just realize why, AoE use real numbers
I don't see Celerity_Level in real arithmetic
 
Level 6
Joined
Jul 23, 2018
Messages
243
I just searched Hive Workshop and realized integer can be converted into real. Never know that, thanks a lot.
Should I repost the triggers or fix the one I just posted?
 
Level 6
Joined
Jul 23, 2018
Messages
243
Solution for the problem is solved

  • Damcele Aura Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Damcele Aura
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Damcele Aura for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attack Speed Bonus (Celerity Aura) for (Triggering unit)) Greater than 0
        • Then - Actions
          • Unit Group - Add (Learning Hero) to Celerity_SourceGroup
          • Unit - Set level of Celerity Aura (Dummy) for (Triggering unit) to AbilLvl[CV]
          • Unit - Set level of Attack Speed Bonus (Celerity Aura) for (Triggering unit) to AbilLvl[CV]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity Aura Loop <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on Celerity Aura Loop <gen>
            • Else - Actions
        • Else - Actions
          • Unit - Add Trueshot Aura (Archer Queen) to (Triggering unit)
          • Unit - Set level of Trueshot Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
  • Damcele Aura Toggle
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(defend))
          • (Issued order) Equal to (Order(undefend))
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Archer Queen
          • (Unit-type of (Triggering unit)) Equal to Archer Queen (AI)
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Damcele Aura for (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Issued order) Equal to (Order(defend))
        • Then - Actions
          • Unit - Remove Trueshot Aura (Archer Queen) from (Triggering unit)
          • Unit Group - Add (Learning Hero) to Celerity_SourceGroup
          • Unit - Add Celerity Aura (Dummy) to (Triggering unit)
          • Unit - Add Attack Speed Bonus (Celerity Aura) to (Triggering unit)
          • Unit - Set level of Celerity Aura (Dummy) for (Triggering unit) to AbilLvl[CV]
          • Unit - Set level of Attack Speed Bonus (Celerity Aura) for (Triggering unit) to AbilLvl[CV]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity Aura Loop <gen> is on) Equal to False
            • Then - Actions
              • Trigger - Turn on Celerity Aura Loop <gen>
            • Else - Actions
        • Else - Actions
          • Unit - Remove Celerity Aura (Dummy) from (Triggering unit)
          • Unit - Remove Attack Speed Bonus (Celerity Aura) from (Triggering unit)
          • Unit - Add Trueshot Aura (Archer Queen) to (Triggering unit)
          • Unit - Set level of Trueshot Aura (Archer Queen) for (Triggering unit) to AbilLvl[CV]
  • Celerity Aura Revive
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
      • (Level of Attack Speed Bonus (Celerity Aura) for (Triggering unit)) Greater than 0
    • Actions
      • Set CV = (Custom value of (Triggering unit))
      • Set AbilLvl[CV] = (Level of Damcele Aura for (Triggering unit))
      • Unit Group - Add (Learning Hero) to Celerity_SourceGroup
      • Unit - Set level of Celerity Aura (Dummy) for (Triggering unit) to AbilLvl[CV]
      • Unit - Set level of Attack Speed Bonus (Celerity Aura) for (Triggering unit) to AbilLvl[CV]
  • Celerity Aura Loop
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • -------- This trigger should be initially OFF --------
      • Unit Group - Pick every unit in Celerity_TargetGroup and do (Actions)
        • Loop - Actions
          • Set Celerity_Target = (Picked unit)
          • Unit - Remove Attack Speed Bonus (Celerity Aura) from Celerity_Target
      • Unit Group - Pick every unit in Celerity_SourceGroup and do (Actions)
        • Loop - Actions
          • Set Celerity_Source = (Picked unit)
          • Set Celerity_Level = (Level of Celerity Aura (Dummy) for Celerity_Source)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Celerity_Source is alive) Equal to True
              • Celerity_Level Greater than 0
            • Then - Actions
              • Set Celerity_Point = (Position of Celerity_Source)
              • Set CeleLvl_Real = (Real(Celerity_Level))
              • Set Celerity_AoE = (825.00 + (75.00 x CeleLvl_Real))
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within Celerity_AoE of Celerity_Point) and do (Actions)
                • Loop - Actions
                  • Set Celerity_Target = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Celerity_Target is alive) Equal to True
                      • (Celerity_Target belongs to an ally of (Owner of Celerity_Source)) Equal to True
                      • (Celerity_Target is A structure) Equal to False
                      • (Celerity_Target is Mechanical) Equal to False
                      • (Celerity_Target is A melee attacker) Equal to False
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Level of Attack Speed Bonus (Celerity Aura) for Celerity_Target) Equal to 0
                        • Then - Actions
                          • Unit - Add Attack Speed Bonus (Celerity Aura) to Celerity_Target
                          • Unit - Set level of Attack Speed Bonus (Celerity Aura) for Celerity_Target to Celerity_Level
                          • Unit Group - Add Celerity_Target to Celerity_TargetGroup
                        • Else - Actions
                      • Unit - For Celerity_Target, Ability Attack Speed Bonus (Celerity Aura), Disable ability: True, Hide UI: False
                      • Unit - For Celerity_Target, Ability Attack Speed Bonus (Celerity Aura), Disable ability: False, Hide UI: False
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_Celerity_Point)
            • Else - Actions
              • Unit Group - Remove Celerity_Source from Celerity_SourceGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Celerity_SourceGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off Celerity Aura Loop <gen>
        • Else - Actions

Abilities:

- Damcele Aura = a toggle ability based on "Defend" for switching aura.
- Celerity Aura (Dummy) = ability based on "Trueshot Aura" to replace "Celerity_Sfx (array)" variable because I don't feel like it is needed.
- Attack Speed Bonus (Celerity Aura) = Item ability that adds attack speed, a replacement for "Endurance Aura" if you intend to use a dummy ability.
- Trueshot Aura (Archer Queen) = ability based on you-all-know-what


Variables:

Celerity_Source = Unit
Celerity_Target = Unit
Celerity_SourceGroup = Unit Group
Celerity_TargetGroup = Unit Group
Celerity_Level = Integer
Celerity_Point = Point
CeleLvl_Real = Real (for converting Celerity_Level integer to real)

Note: I used Trueshot Aura to give buffs to ranged units only

 
Last edited:
Status
Not open for further replies.
Top