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

Any idea on how to trigger an ability on a unit ordered to...

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2005
Messages
523
... attack a specific unit?

For instance, a footman is ordered to attack a gnoll. But not just any gnoll, a gnoll marked with a "warrant" sort of speak (gnoll A). So what I had in mind is to have the footman gain attack damage/movement speed/etc. if he is targeting that specific gnoll A.

But the bonus disappears if he's ordered something else or attack a different unit. And will go back again if he is ordered to attack said gnoll.

The thing is that it has to be when the order is made, not when the gnoll A actually receives the attack.

I tried to use the "unit given order" and setting the condition to "order equals to attack [ gnoll A]" but it's not giving me the bonus. I wonder what I am doing wrong.
 
Level 15
Joined
Oct 16, 2010
Messages
941
Attack orders are only given when you click the attack button on the unit interface and then click an enemy unit. Right-clicking an enemy unit actually gives a "smart" order (right-clicking anywhere gives a "smart" order).

So change the attack string to smart like so:

  • Attack Order Check
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Issued order) Equal to (Order(smart))
              • (Issued order) Equal to (Order(attack))
          • (Unit-type of (Triggering unit)) Equal to Paladin
          • (Unit-type of (Target unit of issued order)) Equal to Rifleman
    • Actions
      • Quest - Display to (All players) the Quest Update message: Paladin is attackin...
 
Status
Not open for further replies.
Top