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

[Trigger] Condition that checks if a unit is currently attacking?

Status
Not open for further replies.
Level 10
Joined
Feb 19, 2006
Messages
237
nope however there are systems that people have made to do this

Can you name a system or link me to one please?

Order issued equal to attack?

This only works once the unit quires the order...a unit can continue on fighting without any additional attack orders...I need some way of checking if a unit is currently attacking.
 
Level 8
Joined
Apr 30, 2009
Messages
338
you can try comparing the current order string to "attack" if you just mean autoattacking

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current order of (Picked unit)) Equal to (Order(attack))
        • Then - Actions
        • Else - Actions
but by "in combat" if you mean like in MMO's where certain abilities cannot be used "in combat" then you would have to check if any other units are attacking your picked unit. Or if the other units do more than just attack, you would have to put the unit on an "aggro list" or some unit group variable and remove it after like 10 seconds of not taking damage. Thats how the blink dagger works in DotA.
 
Status
Not open for further replies.
Top