Auto-Attack based spells?

Xialian

Member
Reaction score
8
Yeah, I don't really know what to call it, but.

Is it possible to make spells trigger with AA's?
Like pressing the bound key (for example Q) and on the next auto-attack, it will trigger? (Q, auto-attacks and applies a 2 second stun and 75 bonus damage or something)
Maybe even resetting the auto-attack timer, making it possible to strike with a normal AA and then a modified AA in a short period of time.
 

keychup

Active Member
Reaction score
34
TRIGGER 0:
Game Initialization
Create a hashtable
Set Hashtable = Last created hashtable

TRIGGER 1:
E: A unit is issued an order
C: Issued Order is equal to flamingarrows (or whatever)
A: Set Booleanvariable = True
Hashtable - Save Booleanvariable as X of Key(TriggeringUnit) in Hashtable

TRIGGER 2:
E: A unit is issued an order
C: Issued Order is equal to unflamingarrows (or whatever)
A: Set Booleanvariable = False
Hashtable - Save Booleanvariable as X of Key(TriggeringUnit) in Hashtable

TRIGGER 3:

E: A unit is attacked
C: Level of AA (or whatever) is greater than 0, Mana of Attacking Unit is greater than or equal to Y
A:Hashtable - Load Booleanvariable as X of Key(TriggeringUnit) from Hashtable
If: Booleanvariable is equal to true
Then:<Effects Here>
Order attacking unit to unflaming arrows (or whatever)
Else:
 

Xialian

Member
Reaction score
8
I'm sorry, haven't tested that yet (haven't had the time!), but will I be able to put a cooldown on such on it? What is see here, is that you made it on a toggleable spell. If you've played LoL, I meant an ability which functions like Darius W, Talon Q, Wukong Q and so forth. Again, if this is already the case, sorry to disturb you :)
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
I think a good solution is to find a base WC3 ability that is instant-cast and applies a buff on the caster (e.g. Berserk) and change the buff to a custom one. Then do a trigger something along the lines of this:
Trigger:
  • Autoattack spell
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff CustomBuff ) Equal to True
    • Actions
      • -------- Spell effects --------
      • Unit - Remove CustomBuff buff from (Attacking unit)
Just put your desired cooldown, manacost, etc. on the spell that gives the buff and I think you're set.

Edit: There is the minor discrepancy with using A Unit Is Attacked, this spell will be triggered as soon as your unit starts its backswing, not when the attacked unit actually takes damage. This may cause some kind of minor error depending on what your spells do (basic ones will be fine, just things like knockback or accidentally turning the target invincible midswing will have issues). In order to make it A Unit Takes Damage, there's some extra work that you need to do that I don't know because I haven't tried it myself yet. But for the most part this is fine by itself.
 

Xialian

Member
Reaction score
8
I just thought of something. "A key is pressed" "Key = Q" "Unit controlled = (this hero)" "Deal damage" and so forth, maybe dummy units using stuns and whatnot. I think when Q is set up in triggers, it will also put the Q on the hero on Cooldown and reduce mana. I will try this and what you wrote, Xan :)
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
Using A Key is Pressed won't give you any data like who to deal the bonus effects to. This also opens it up to exploitation by pressing the necessary key, and then using the Stop command before the spell is finished casting so it doesn't cost mana/cooldowns. Also there'd have to be some kind of detection for if the unit with that spell is even selected, and... it's just a trap to try that way. All you need is the unit to give itself a unique buff for the spell, and then detect if a unit is attacked by someone with said buff.
 
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