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

Auto Attack by Skill

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
How to make a trigger that, when the Attack Button ("A") is pressed, the Unit/Hero INSTANTLY aims for attack the CLOSEST enemy within x range ? MUI if possible.

I know I could press "S", then the hero would stop and, dealt by the auto attack of Wc3, he would hit, but isn't there anyway to do this with Trigger? Something like pick every unit, order to attack picked unit...
 
Level 12
Joined
Oct 16, 2010
Messages
680
it would be better to make a dummy spell based on channel and name it "auto attack" or whatever.
make it instant cast and when pressed search for enemies within desired range and find closest among them. then order unit to attack found target.

  • Events
    • spell effect
  • Conditions
    • your spell
  • Actions
    • Set u = (triggering unit)
    • Set tempreal = 10000
    • Set tempgroup = units within x range matching ... bla bla
    • Pick every unit in tempgroup and do actions
      • If all conditions are true then
        • range between (picked unit) and u smaller then tempreal
      • Actions
        • Set tempreal = range between (picked unit) and u
        • Set tempunit = (picked unit)
    • Unit - order u to attack tempunit
its MUI becouse its instant
 
  • Like
Reactions: hdm

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
+rep.

Is it possible to change the current hotkey of Auto Attack (A) ? Set to anything else.
 
Status
Not open for further replies.
Top