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

Weird trigger behavior

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,141
Hello everyone. I want to create system like this. When player selects any unit, game automatically selects their own heroes. I want to exclude specific buildings.

  • OtomatikSecimGrubu
    • Events
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 5 (Yellow) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
      • Player - Player 9 (Gray) Selects a unit
      • Player - Player 10 (Light Blue) Selects a unit
      • Player - Player 11 (Dark Green) Selects a unit
      • Player - Player 12 (Brown) Selects a unit
    • Conditions
      • ((Triggering player) is in OtomatikSecim) Equal to True
      • And - All (Conditions) are true
        • Conditions
          • (Triggering unit) Not equal to Imp (orta) 0015 <gen>
          • (Triggering unit) Not equal to Fire Tower Level 2 0041 <gen>
    • Actions
      • Selection - Select Archmage 0001 <gen> for (Triggering player)
Let me tell you what happens. When i try to select 2 units within condition, i am able to click them.
And when i try to click any unit expect of these 2 units within condition, trigger works well. There are no problems since here.
But after i do that, when i click these 2 units within condition, no more i am able to select them.
What am i missing?

When i start to game and try to click any units excluding these two, no more i am able to click these units again.

Here is what i want.

When player clicks units EXPECT OF Unit A, Unit B, Unit C etc etc, automatically select specific unit for the triggering player.

This trigger for the testing purpose only. Imp and Fire towers just a dummy units and Archmage 0001 as well.

Edit: I shrunk trigger for the test.

I am able to click specified unit, but i can do this only once.

  • OtomatikSecimGrubu Copy 2
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Triggering unit) Not equal to Fire Tower Level 2 0041 <gen>
    • Actions
      • Selection - Select Archmage 0001 <gen> for (Triggering player)
____________________________

Edit 2: Ok i have solved it by myself. When game selects the archmage for us, it makes this trigger runs again :D we have to exclude specified player unit also.

  • OtomatikSecimGrubu Copy 2 Copy
    • Events
      • Player - Player 2 (Blue) Selects a unit
    • Conditions
      • (Triggering unit) Not equal to Archmage 0001 <gen>
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to Fire Tower Level 2 0041 <gen>
        • Then - Actions
        • Else - Actions
          • Selection - Select Archmage 0001 <gen> for (Triggering player)
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,567
Also, your use of And - All (Conditions) are true is unnecessary. Conditions need to all be true by default.

This:
  • Conditions
    • ((Triggering player) is in OtomatikSecim) Equal to True
    • And - All (Conditions) are true
      • Conditions
        • (Triggering unit) Not equal to Imp (orta) 0015 <gen>
        • (Triggering unit) Not equal to Fire Tower Level 2 0041 <gen>

Is exactly the same as this:
  • Conditions
    • ((Triggering player) is in OtomatikSecim) Equal to True
    • (Triggering unit) Not equal to Imp (orta) 0015 <gen>
    • (Triggering unit) Not equal to Fire Tower Level 2 0041 <gen>
 
Status
Not open for further replies.
Top