Dialogs

sabrio

Active Member
Reaction score
27
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.
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)


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 (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 (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 (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 (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


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 (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 (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 (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 (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


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


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
          • Set Game_Mode = 3
        • Else - 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[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
          • Set Game_Mode = 3
        • Else - 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[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
          • Set Game_Mode = 3
        • Else - Actions
 

kaboo

New Member
Reaction score
45
this is very uneffective,
look,
Code:
> if x=2 then
  - set integer to 5
  - do thing B
  - do thing C
> if x=3 then
  - set integer to 9
  - do thing B
  - do thing C
Code:
> if x=2 then
  - set integer to 5
> if x=3 then
  - set integer to 9
> do thing B
> do thing C
these two "triggers" are the same, i know that there is not much difference in this short example but it can make your triggers much more readable,
i will try to figure out your problem too, it just take some more time
 

sabrio

Active Member
Reaction score
27
this is very uneffective,
look,
Code:
> if x=2 then
  - set integer to 5
  - do thing B
  - do thing C
> if x=3 then
  - set integer to 9
  - do thing B
  - do thing C
Code:
> if x=2 then
  - set integer to 5
> if x=3 then
  - set integer to 9
> do thing B
> do thing C
these two "triggers" are the same, i know that there is not much difference in this short example but it can make your triggers much more readable,
i will try to figure out your problem too, it just take some more time

I MUST do
Code:
> if x=2 then
  - set integer to 5
  - do thing B
  - do thing C
> if x=3 then
  - set integer to 9
  - do thing B
  - do thing C
just the fact that each 4 buttons trigger something,1 other trigger something else, 3 other triggers something else.If I use your way any button will triggers everything.
Hope you understood me
 

kaboo

New Member
Reaction score
45
Code:
- 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
this is part from normal mode choose which i named "do thing B /do thing C"
Code:
- Set Number_of_Kills_to_win = 10
- Game - Display to (All players) the text: Game Mode was set t...
and this is the variable part (mby the text displayed is same, but i cant see it :p )
 

sabrio

Active Member
Reaction score
27
Code:
- 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
this is part from normal mode choose which i named "do thing B /do thing C"
Code:
- Set Number_of_Kills_to_win = 10
- Game - Display to (All players) the text: Game Mode was set t...
and this is the variable part (mby the text displayed is same, but i cant see it :p )

The text is
Game Mode was set to normal mode with <Number_of_Kills_to_Win> kills.
Can you explain me what this has to do with the prob :confused:
 

kaboo

New Member
Reaction score
45
kaboo said:
these two "triggers" are the same, i know that there is not much difference in this short example but it can make your triggers much more readable,
i will try to figure out your problem too, it just take some more time

1
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I've found your problem. I'm really lazy, so I did'nt continue checking and stopped at the problem. Under your "basic mode choose" trigger, your If/then/else should be linked.
Like example,

If
Condition
Then
Action
Else
Another action

And NOT

If
Condition
Then
Action
Else

Another action
 

kaboo

New Member
Reaction score
45
I've found your problem. I'm really lazy, so I did'nt continue checking and stopped at the problem. Under your "basic mode choose" trigger, your If/then/else should be linked.
Like example,

If
Condition
Then
Action
Else
Another action

And NOT

If
Condition
Then
Action
Else

Another action

its worth a try but i dont think this will help somehow, since there is always " if button[x] is clicked then " and you cant click on two different buttons in one time
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Well I said I stop looking after I reached the problem. Let's see what problem he gets next or is he still stuck at the same one.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
You've linked all the elses and you still have the same prob? weird..
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top