• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

Custom Aura Trigger?

Status
Not open for further replies.
Level 6
Joined
Feb 6, 2008
Messages
166
I'm making decent progress on my map, Ladder Advanced. I've gotten started with implementing the first custom race. One of its heroes has an ultimate that is right now temporarily called "Battlethirst Aura". Basically, all units under the aura's effect will gain an extra 5% attack speed each time they attack, maxing at +50% attack speed, but if they have not attacked in the last 2 seconds, then all of that bonus attack speed disappears.

--[Post on pause. Gotta go to class. I'll post up what I have so far when I get back in 2-3 hours.]--
 
Level 6
Joined
Feb 6, 2008
Messages
166
Oh, thanks for the offer to help. I just started learning how to work with triggers a few days ago, so I'm pretty inexperienced. Let's see...

First off, I was looking at this tutorial, under "III. Custom auras".
Creating some basic abilities

This trigger was for me to set up variables for my custom auras.
  • Aura Setups
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set BattlethirstAbility[1] = Battlethirst (Level 1)
      • Set BattlethirstAbility[2] = Battlethirst (Level 2)
      • Set BattlethirstAbility[3] = Battlethirst (Level 3)
      • Set BattlethirstAbility[4] = Battlethirst (Level 4)
      • Set BattlethirstAbility[5] = Battlethirst (Level 5)
      • Set BattlethirstAbility[5] = Battlethirst (Level 5)
      • Set BattlethirstAbility[6] = Battlethirst (Level 6)
      • Set BattlethirstAbility[7] = Battlethirst (Level 7)
      • Set BattlethirstAbility[8] = Battlethirst (Level 8)
      • Set BattlethirstAbility[9] = Battlethirst (Level 9)
      • Set BattlethirstAbility[10] = Battlethirst (Level 10)
      • Set BattlethirstBuff[1] = Battlethirst Level 1
      • Set BattlethirstBuff[2] = Battlethirst Level 2
      • Set BattlethirstBuff[3] = Battlethirst Level 3
      • Set BattlethirstBuff[4] = Battlethirst Level 4
      • Set BattlethirstBuff[5] = Battlethirst Level 5
      • Set BattlethirstBuff[6] = Battlethirst Level 6
      • Set BattlethirstBuff[7] = Battlethirst Level 7
      • Set BattlethirstBuff[8] = Battlethirst Level 8
      • Set BattlethirstBuff[9] = Battlethirst Level 9
      • Set BattlethirstBuff[10] = Battlethirst Level 10
... and then I also had this trigger:
  • Bloodthirst Aura
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Battlethirst Aura ) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) has buff BattlethirstBuff[10]) Equal to True
        • Then - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) has buff BattlethirstBuff[10]) Equal to True
        • Then - Actions
        • Else - Actions
      • Unit - Remove Battlethirst Aura buff from (Attacking unit)
I was attempting to set it up so that units affected by the Battlethirst aura would attack once, gain "Battlethirst (Level 1)" for +5% attack speed, attack again, lose the level 1 skill and gain "Battlethirst (Level 2)" for +10% attack speed instead, and so forth, until the attacking unit didn't attack for a period of 2 seconds, after which it would attempt to remove every different level of Battlethirst. That way, regardless of how much attack speed bonus it had, it would lose it if it stopped attacking for two seconds.

I'm guessing the way I set it up was very inefficient or probably wouldn't work. xD If you need any info about anything I have set up, ask. I honestly wouldn't mind scrapping those two triggers and working on it from scratch again, if there is a better way to do it.
 
Level 9
Joined
May 28, 2007
Messages
365
Here is how I would go about doing it, but fore that yo should know something about Is Attacked event. It detects the order, not the actual attack which can be exploited by smarter uses on Battle.Net so that they can spam the event, making the trigger fire, without actually attacking. The only alternative to this is a damage detection systems, but those are tough for beginners. You'll probably stick with Is Attacked, but that's just something you should know.

So, this is how I would go about it.

  • Unit - A unit Is attacked
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Attacking unit) has buff Dummy Buff) Equal to True
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) has buff Dummy Buff) Equal to True
        • Then - Actions
          • Unit - Increase level of (AI) Spider Bomb for (Attacking unit)
        • Else - Actions
          • Unit - Add (Item System) OffhandAgi to (Attacking unit)
    • Else - Actions
Then you just have a dummy ability based off Gloves of Haste, that has 10 different levels or whatever, and an increment of 5% per level.

The messier part is the limited duration of the buff... I do believe you'll need a timer for that I'm afraid, UNLESS you use your way with 50 different Bloodlust dummies, they can cast Bloodlust that lasts for 2 seconds. Check the buff level of the Bloodlust already on, then set Bloodlust level to the bufflevel+1.
 
Level 6
Joined
Feb 6, 2008
Messages
166
Thanks again, Maker. It's very buggy, but it's much better than anything I can do.

Battlethirst Aura definitely won't be ready for any actual use anytime soon, but I'm reading through the triggers and studying how they work so that I can either adapt the aura to better match the triggers, or modify the triggers to better match the aura.

Bugs I noticed:
- Units touched by the aura get it's bonuses permanently. If the unit leaves the aura and attacks, it still gets the battlethirst bonus. This one can probably be fixed by adding a trigger to remove a given unit from BTA_Loop_Group if it leaves the aura range.
- Units that have lost Battlethirst's buff previously, pick it back up at the same level it was lost. Kind of defeats the idea of losing the buff if it affects attack speed and you regain it on attacking. xD

Anyways, thanks for making this for me. I'm going to try to meld your system with some ideas I came across yesterday to see if I can get it working.
 
Level 6
Joined
Feb 6, 2008
Messages
166
Actually, Battlethirst is what I originally called it. xD I think it sounds a little strange though.

Edit:
Uh oh. I hit more problems.

1. When the hero that has Bloodthirst Aura (I decided to stick with this name) dies in a certain spot, the bloodthirst aura stays there. Any allied units that walk within range of the death spot receive the attack speed bonus.

2. When they have stopped attacking for two seconds, bloodthirst disappears. This is correct. However, as long as the unit is still within aura's range, if it continues attacking anytime later, it will continue where it left off. This means the hero owning the aura will never lose the Level 10 Cripple (BTA) buff.

I haven't tested either with reviving the hero at an altar yet though. I will test it soon.

Maybe I should ask how Zealot/Fanatic Towers work in Element TD.
 
Last edited:
Status
Not open for further replies.
Top