Events for trigger 1
UI - Player Any Player clicks Left mouse button Down.
//This trigger fires every time the left mouse button is clicked (even if I test for 'mouse clicked world point != no point')
Events for trigger 2
Unit Selection - Any Unit is clicked by Player Any Player
//I want this trigger to prevent the first one from firing if it does
I'm looking for anything that would work that does not use 'waits' at the start of either trigger. I've also tried to combine the two events in one trigger, but it acts as two separate triggers regardless in the same instance.
one global booleans variable and the two triggers checking it in the condition.
the frist trigger runs only if it is true the other only if it is false.
and the first action is changing the boolean
one global booleans variableand the two triggers checking it in the condition.
the frist trigger runs only if it is true the other only if it is false.
and the first action is changing the boolean
----
I tested that and it didn't work. Only thing that seems acceptible is a wait with 0.0 seconds, but I'd still rather avoid using a wait.
You have a trigger create somewhere (if you use gui it is at the bottom of the "trigger" you can see in the list on the left side). The one that should prevent the other from running is supposed to created abouve the other (for gui: move that trigger abouve the other in the list on the left side). Use a global boolean wich is normally set to true. Whenever your first trigger runs, set the boolean to false. When your second trigger runs, check the boolean, if its true, execute, else change the boolean to true.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
First off I have two triggers. Here they are:
Events for trigger 1
UI - Player Any Player clicks Left mouse button Down.
//This trigger fires every time the left mouse button is clicked (even if I test for 'mouse clicked world point != no point')
Events for trigger 2
Unit Selection - Any Unit is clicked by Player Any Player
//I want this trigger to prevent the first one from firing if it does
I'm looking for anything that would work that does not use 'waits' at the start of either trigger. I've also tried to combine the two events in one trigger, but it acts as two separate triggers regardless in the same instance.
http://www.sc2mapster.com/forums/development/triggers/23701-damage-source/?post=4
one global booleans variable and the two triggers checking it in the condition.
the frist trigger runs only if it is true the other only if it is false.
and the first action is changing the boolean
Quote from b0ne123:
http://www.sc2mapster.com/forums/development/triggers/23701-damage-source/?post=4
one global booleans variableand the two triggers checking it in the condition.
the frist trigger runs only if it is true the other only if it is false.
and the first action is changing the boolean
----
I tested that and it didn't work. Only thing that seems acceptible is a wait with 0.0 seconds, but I'd still rather avoid using a wait.
You have a trigger create somewhere (if you use gui it is at the bottom of the "trigger" you can see in the list on the left side). The one that should prevent the other from running is supposed to created abouve the other (for gui: move that trigger abouve the other in the list on the left side). Use a global boolean wich is normally set to true. Whenever your first trigger runs, set the boolean to false. When your second trigger runs, check the boolean, if its true, execute, else change the boolean to true.