- Joined
- Jul 5, 2014
- Messages
- 551
I have a persistently bugging experience with select unit. Long story short: I'm making a puzzle like the one with the sheeps from the Blood Elf campaign, except it requires selecting rather than standing on the platform. I run it with If/Then/Else with an integer variable that increases every time to correct selection is made. While it works by itself, the moment I added a failure (else) option, it immediately fails because it interprets the first selection as a second as well. This is what the trigger looks like:
-
Solving
-
Events
-
Player - Player 2 (Blue) Selects a unit
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) Equal to First 0126 <gen>) and (Puzzle Equal to 0)
-
-
Then - Actions
-
Wait 0.20 seconds
-
Set Puzzle = 1
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Not equal to First 0126 <gen>
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Game - Display to (All players) the text: Oh nooooo!
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) Equal to Second 0124 <gen>) and (Puzzle Equal to 1)
-
-
Then - Actions
-
Wait 0.20 seconds
-
Set Puzzle = 2
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) Not equal to Second <gen>) and (Puzzle Equal to 1)
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Game - Display to (All players) the text: Oh nooooo!
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) Equal to Third 0127 <gen>) and (Puzzle Equal to 2)
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Wait 0.20 seconds
-
Trigger - Turn off Reset Puzzle <gen> (trigger when cancelled the puzzle)
-
Trigger - Turn off Puzzle <gen> (trigger to begin)
-
Game - Display to (All players) the text: Win!
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) Not equal to Third <gen>) and (Puzzle Equal to 2)
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Game - Display to (All players) the text: Oh nooooo!
-
-
Else - Actions
-
-
-
-
-