- Joined
- Jun 12, 2016
- Messages
- 74
I'm making a Menu options in my single player game, its like this:
Menu:
Camera Settings
Color Settings
Exit
If the player selects Camera Settings open another dialog:
Camera Settings:
Fixed Camera
Unfixed Camera
Camera Distance 1
Camera Distance 2
Camera Distance 3
And for some reason the second dialog buttons are ignored, here:
EDIT: More info:
The temp_dialog beign the same for both dialogs is not the problem since the seccond triggers do run for the temp_dialog, I have also tested with different variables for the temp_dialog_button with an temp_dialog_button2 but didn't run either. The problem is in the condition reading "(Clicked dialog button) Equal to temp_dialog_button[0]" for some reason it is not reading it.
Menu:
Camera Settings
Color Settings
Exit
If the player selects Camera Settings open another dialog:
Camera Settings:
Fixed Camera
Unfixed Camera
Camera Distance 1
Camera Distance 2
Camera Distance 3
And for some reason the second dialog buttons are ignored, here:
-
Menu options
-
Events
-
Dialog - A dialog button is clicked for temp_dialog
-
-
Conditions
-
Actions
-
Trigger - Turn off (This trigger)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to temp_dialog_button[0]
-
-
Then - Actions
-
Trigger - Turn on Menu changes for camera <gen>
-
Dialog - Clear temp_dialog
-
Dialog - Change the title of temp_dialog to Alterar Câmera:
-
Dialog - Create a dialog button for temp_dialog labelled Câmera Fixada
-
Set temp_dialog_button[0] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Câmera Livre
-
Set temp_dialog_button[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Distância 1
-
Set temp_dialog_button[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Distância 2
-
Set temp_dialog_button[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Distância 3
-
Set temp_dialog_button[4] = (Last created dialog Button)
-
Dialog - Show temp_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 temp_dialog_button[1]
-
-
Then - Actions
-
Trigger - Turn on Menu changes for collor <gen>
-
Dialog - Clear temp_dialog
-
Dialog - Change the title of temp_dialog to Alterar Cor:
-
Dialog - Create a dialog button for temp_dialog labelled Vermelho
-
Set temp_dialog_button[0] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Azul
-
Set temp_dialog_button[1] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Cerceta
-
Set temp_dialog_button[2] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Roxo
-
Set temp_dialog_button[3] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Amarelo
-
Set temp_dialog_button[4] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Laranja
-
Set temp_dialog_button[5] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Verde
-
Set temp_dialog_button[6] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Rosa (Original)
-
Set temp_dialog_button[7] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Cinza
-
Set temp_dialog_button[8] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Azul Claro
-
Set temp_dialog_button[9] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Verde Escuro
-
Set temp_dialog_button[10] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Castanho
-
Set temp_dialog_button[11] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Castanho Avermelhado
-
Set temp_dialog_button[12] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Azul Escuro
-
Set temp_dialog_button[13] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Turquesa
-
Set temp_dialog_button[14] = (Last created dialog Button)
-
Dialog - Create a dialog button for temp_dialog labelled Violeta
-
Set temp_dialog_button[15] = (Last created dialog Button)
-
Dialog - Show temp_dialog for Player 1 (Red)
-
-
Else - Actions
-
-
-
-
Menu changes for camera
-
Events
-
Dialog - A dialog button is clicked for temp_dialog
-
-
Conditions
-
Actions
-
Trigger - Turn off (This trigger)
-
Game - Display to (All players) the text: 0
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to temp_dialog_button[0]
-
-
Then - Actions
-
Game - Display to (All players) the text: 1
-
Trigger - Run Game Camera <gen> (checking conditions)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to temp_dialog_button[1]
-
-
Then - Actions
-
Game - Display to (All players) the text: 2
-
Trigger - Run Game Camera <gen> (checking conditions)
-
Camera - Lock camera target for Player 1 (Red) to Hero, offset by (40.00, 40.00) using The unit's rotation
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to temp_dialog_button[2]
-
-
Then - Actions
-
Set cameraheight_integer = 1
-
Set temp_point4 = (Target of current camera view)
-
Camera - Apply Game Camera 1 <gen> for Player 1 (Red) over 0.10 seconds
-
Camera - Pan camera for Player 1 (Red) to temp_point4 over 0.00 seconds
-
Custom script: call RemoveLocation (udg_temp_point4)
-
Game - Display to (All players) the text: (|cffF5A9A9Ajustando visão para câmera + ((String(cameraheight_integer)) + .|r))
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to temp_dialog_button[3]
-
-
Then - Actions
-
Set cameraheight_integer = 2
-
Set temp_point4 = (Target of current camera view)
-
Camera - Apply Game Camera 2 <gen> for Player 1 (Red) over 0.10 seconds
-
Camera - Pan camera for Player 1 (Red) to temp_point4 over 0.00 seconds
-
Custom script: call RemoveLocation (udg_temp_point4)
-
Game - Display to (All players) the text: (|cffF5A9A9Ajustando visão para câmera + ((String(cameraheight_integer)) + .|r))
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to temp_dialog_button[4]
-
-
Then - Actions
-
Set cameraheight_integer = 3
-
Set temp_point4 = (Target of current camera view)
-
Camera - Apply Game Camera 3 <gen> for Player 1 (Red) over 0.10 seconds
-
Camera - Pan camera for Player 1 (Red) to temp_point4 over 0.00 seconds
-
Custom script: call RemoveLocation (udg_temp_point4)
-
Game - Display to (All players) the text: (|cffF5A9A9Ajustando visão para câmera + ((String(cameraheight_integer)) + .|r))
-
-
Else - Actions
-
-
-
-
Game - Display to (All players) the text: 0
-
Game - Display to (All players) the text: 1
EDIT: More info:
The temp_dialog beign the same for both dialogs is not the problem since the seccond triggers do run for the temp_dialog, I have also tested with different variables for the temp_dialog_button with an temp_dialog_button2 but didn't run either. The problem is in the condition reading "(Clicked dialog button) Equal to temp_dialog_button[0]" for some reason it is not reading it.
Last edited: