• 🏆 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] Making friendly units non-attack able?

Status
Not open for further replies.
Level 25
Joined
Mar 23, 2008
Messages
1,813
Shouldnt this work as a trigger to make that (as the title says)?

  • NoneFriendlyAttack
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Target unit of issued order) belongs to an ally of (Owner of (Ordered unit))) Equal to True
      • (Issued order) Equal to (Order(attack))
    • Actions
      • Unit - Order (Ordered unit) to Stop
 
Level 11
Joined
Oct 13, 2005
Messages
233
Shouldnt this work as a trigger to make that (as the title says)?

  • NoneFriendlyAttack
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Target unit of issued order) belongs to an ally of (Owner of (Ordered unit))) Equal to True
      • (Issued order) Equal to (Order(attack))
    • Actions
      • Unit - Order (Ordered unit) to Stop

What you probably need to do is pause the ordered unit, issue the stop order, and then unpause it. Here's how I did it in one of my maps:
  • AntiTeamKill
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • ((Target unit of issued order) belongs to an ally of (Owner of (Triggering unit))) Equal to True
    • Actions
      • Unit - Pause (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
      • Unit - Unpause (Triggering unit)
 
Status
Not open for further replies.
Top