• 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.

Cancelling an attack order?

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
I'm trying to make an anti TK system.

Is there a way to detect when a unit attacks a building. And detect if that attacker is on a team or player color etc?

The only event I found was unit issued order targeting an object. How do I detect if it's an attack order?
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
  • Attack Order
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Target unit of issued order) is A structure) Equal to True
      • (Issued order) Equal to (Order(attack))
      • ((Owner of (Target unit of issued order)) is an ally of (Owner of (Triggering unit))) Equal to True
    • Actions
      • Unit - Order (Triggering unit) to Stop
You can also order the unit to attack-move to the position of the targeted unit or follow the targeted unit for example.
 
Status
Not open for further replies.
Top