• 🏆 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] Is this trigger leakless?

Status
Not open for further replies.
Level 8
Joined
Mar 5, 2011
Messages
199
  • 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
 
Level 8
Joined
Mar 5, 2011
Messages
199
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