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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top