• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Weird trigger behavior

Status
Not open for further replies.
Level 18
Joined
Jun 2, 2009
Messages
1,236
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 74
Joined
Aug 10, 2018
Messages
7,957
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