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

[Trigger] Is this trigger leakless?

Status
Not open for further replies.
  • Disable Friendly Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Attacked unit)) Equal to Player 1 (Red)
          • (Owner of (Attacked unit)) Equal to Player 2 (Blue)
          • (Owner of (Attacked unit)) Equal to Player 3 (Teal)
          • (Owner of (Attacked unit)) Equal to Player 4 (Purple)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Attacking unit)) Equal to Player 5 (Yellow)
              • (Owner of (Attacking unit)) Equal to Player 6 (Orange)
              • (Owner of (Attacking unit)) Equal to Neutral Hostile
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Unit - Order (Attacking unit) to Stop
 
Level 16
Joined
Jun 24, 2009
Messages
1,409
Just remove the do nothing. With it you call a function that does nothing.
Here you are an easier way to disable friendly attack:
  • Friendly Attack Disable
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop
 
Just remove the do nothing. With it you call a function that does nothing.
Here you are an easier way to disable friendly attack:
  • Friendly Attack Disable
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) belongs to an ally of (Owner of (Attacking unit))) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop
ok.. Thanks!
 
Status
Not open for further replies.
Top