These are triggers I use in my map : Shaman Arena
I use dialogs to set the game mode but there is a little problem I don't understand, when the player click in ANY button it's say "Game Mode was set to normal, load of times.
I use dialogs to set the game mode but there is a little problem I don't understand, when the player click in ANY button it's say "Game Mode was set to normal, load of times.
Trigger:
- Initialization
- Events
- Time - Elapsed game time is 1.00 seconds
- Conditions
- Actions
- Game - Display to (All players) for 20.00 seconds the text: Please while host c...
- Dialog - Clear Game_Mode_Dialog
- Dialog - Hide Game_Mode_Dialog for Player 1 (Red)
- Dialog - Change the title of Game_Mode_Dialog to Choose Game Mode
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Normal Mode
- Set Game_Mode_Dialog_Button[1] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Death Match
- Set Game_Mode_Dialog_Button[2] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Again the Creeps
- Set Game_Mode_Dialog_Button[3] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Capture The Flag
- Set Game_Mode_Dialog_Button[4] = (Last created dialog Button)
- Dialog - Show Game_Mode_Dialog for Player 1 (Red)
- Events
Trigger:
- Basic Mode Choose
- Events
- Dialog - A dialog button is clicked for Game_Mode_Dialog
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[1]
- Then - Actions
- Dialog - Hide Game_Mode_Dialog for Player 1 (Red)
- Dialog - Clear Game_Mode_Dialog
- Dialog - Change the title of Game_Mode_Dialog to |cff7cfc00Normal Mo...
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Set Kills to 10
- Set Game_Mode_Dialog_Button[5] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Set Kills to 20
- Set Game_Mode_Dialog_Button[6] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Set Kills to 30
- Set Game_Mode_Dialog_Button[7] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Set Kills to 40
- Set Game_Mode_Dialog_Button[8] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Set Kills to 50
- Set Game_Mode_Dialog_Button[9] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Choose Another Mode
- Set Game_Mode_Dialog_Button[10] = (Last created dialog Button)
- Dialog - Show Game_Mode_Dialog for Player 1 (Red)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[2]
- Then - Actions
- Dialog - Hide Game_Mode_Dialog for Player 1 (Red)
- Dialog - Clear Game_Mode_Dialog
- Dialog - Change the title of Game_Mode_Dialog to |cff7cfc00Death Mat...
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Choose This Mode
- Set Game_Mode_Dialog_Button[11] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Choose Another Mode
- Set Game_Mode_Dialog_Button[10] = (Last created dialog Button)
- Dialog - Show Game_Mode_Dialog for Player 1 (Red)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[3]
- Then - Actions
- Dialog - Hide Game_Mode_Dialog for Player 1 (Red)
- Dialog - Clear Game_Mode_Dialog
- Dialog - Change the title of Game_Mode_Dialog to |cff7cfc00Versus th...
- Dialog - Create a dialog button for Game_Mode_Dialog labelled 20 Waves
- Set Game_Mode_Dialog_Button[12] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled 30 Waves
- Set Game_Mode_Dialog_Button[13] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled 40 Waves
- Set Game_Mode_Dialog_Button[14] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Choose Another Mode
- Set Game_Mode_Dialog_Button[10] = (Last created dialog Button)
- Dialog - Show Game_Mode_Dialog for Player 1 (Red)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[4]
- Then - Actions
- Dialog - Hide Game_Mode_Dialog for Player 1 (Red)
- Dialog - Clear Game_Mode_Dialog
- Dialog - Change the title of Game_Mode_Dialog to |cff7cfc00Capture t...
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Flag must be captur...
- Set Game_Mode_Dialog_Button[15] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Flag must be captur...
- Set Game_Mode_Dialog_Button[16] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Flag must be captur...
- Set Game_Mode_Dialog_Button[17] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Choose Another Mode
- Set Game_Mode_Dialog_Button[10] = (Last created dialog Button)
- Dialog - Show Game_Mode_Dialog for Player 1 (Red)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[10]
- Then - Actions
- Dialog - Hide Game_Mode_Dialog for Player 1 (Red)
- Dialog - Clear Game_Mode_Dialog
- Dialog - Change the title of Game_Mode_Dialog to Choose Game Mode
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Normal Mode
- Set Game_Mode_Dialog_Button[1] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Death Match
- Set Game_Mode_Dialog_Button[2] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Again the Creeps
- Set Game_Mode_Dialog_Button[3] = (Last created dialog Button)
- Dialog - Create a dialog button for Game_Mode_Dialog labelled Capture The Flag
- Set Game_Mode_Dialog_Button[4] = (Last created dialog Button)
- Dialog - Show Game_Mode_Dialog for Player 1 (Red)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- Normal Mode Choose
- Events
- Dialog - A dialog button is clicked for Game_Mode_Dialog
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[5]
- Then - Actions
- Set Number_of_Kills_to_win = 10
- Game - Display to (All players) the text: Game Mode was set t...
- Multiboard - Set the text for Multiboard[1] item in column 1, row 14 to (Number of Kills : + (String(Number_of_Kills_to_win)))
- Multiboard - Show Multiboard[1]
- Set Game_Mode_Choosed = True
- Set Game_Mode = 1
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[6]
- Then - Actions
- Set Number_of_Kills_to_win = 20
- Game - Display to (All players) the text: Game Mode was set t...
- Multiboard - Set the text for Multiboard[1] item in column 1, row 14 to (Number of Kills : + (String(Number_of_Kills_to_win)))
- Multiboard - Show Multiboard[1]
- Set Game_Mode_Choosed = True
- Set Game_Mode = 1
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[7]
- Then - Actions
- Set Number_of_Kills_to_win = 30
- Game - Display to (All players) the text: Game Mode was set t...
- Multiboard - Set the text for Multiboard[1] item in column 1, row 14 to (Number of Kills : + (String(Number_of_Kills_to_win)))
- Multiboard - Show Multiboard[1]
- Set Game_Mode_Choosed = True
- Set Game_Mode = 1
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[8]
- Then - Actions
- Set Number_of_Kills_to_win = 40
- Game - Display to (All players) the text: Game Mode was set t...
- Multiboard - Set the text for Multiboard[1] item in column 1, row 14 to (Number of Kills : + (String(Number_of_Kills_to_win)))
- Multiboard - Show Multiboard[1]
- Set Game_Mode_Choosed = True
- Set Game_Mode = 1
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[9]
- Then - Actions
- Set Number_of_Kills_to_win = 50
- Game - Display to (All players) the text: Game Mode was set t...
- Multiboard - Set the text for Multiboard[1] item in column 1, row 14 to (Number of Kills : + (String(Number_of_Kills_to_win)))
- Multiboard - Show Multiboard[1]
- Set Game_Mode_Choosed = True
- Set Game_Mode = 1
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- Death Match Mode
- Events
- Dialog - A dialog button is clicked for Game_Mode_Dialog
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[11]
- Then - Actions
- Game - Display to (All players) the text: Game Mode was set t...
- Multiboard - Show Multiboard[2]
- Set Game_Mode_Choosed = True
- Set Game_Mode = 2
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- Versus the Creep
- Events
- Dialog - A dialog button is clicked for Game_Mode_Dialog
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[12]
- Then - Actions
- Set Game_Mode_Choosed = True
- Game - Display to (All players) the text: Game Mode was set t...
- Set Waves = 20
- Multiboard - Show Multiboard[3]
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- For each (Integer B) from 1 to 12, do (Actions)
- Loop - Actions
- Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
- Loop - Actions
- For each (Integer B) from 1 to 12, do (Actions)
- Loop - Actions
- Set Game_Mode = 3
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[13]
- Then - Actions
- Set Game_Mode_Choosed = True
- Game - Display to (All players) the text: Game Mode was set t...
- Set Waves = 30
- Multiboard - Show Multiboard[3]
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- For each (Integer B) from 1 to 12, do (Actions)
- Loop - Actions
- Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
- Loop - Actions
- For each (Integer B) from 1 to 12, do (Actions)
- Loop - Actions
- Set Game_Mode = 3
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Clicked dialog button) Equal to Game_Mode_Dialog_Button[14]
- Then - Actions
- Set Game_Mode_Choosed = True
- Game - Display to (All players) the text: Game Mode was set t...
- Set Waves = 40
- Multiboard - Show Multiboard[3]
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- For each (Integer B) from 1 to 12, do (Actions)
- Loop - Actions
- Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
- Loop - Actions
- For each (Integer B) from 1 to 12, do (Actions)
- Loop - Actions
- Set Game_Mode = 3
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events