Ok so I am working on a dialog system and I am using Get Local Player so each player has there own dialog and it wont be affected by other player pushing dialog buttons
Its desyncing, could you tell me why?
Also, if there is a better way to do a dialog vote system, lmk.
Its desyncing, could you tell me why?
Also, if there is a better way to do a dialog vote system, lmk.
-
Initialization
-
Events
- Map initialization
- Conditions
-
Actions
- Custom script: set udg_GetLocalPlayer = GetLocalPlayer()
-
Events
-
Create Fog Vote
- Events
- Conditions
-
Actions
- Custom script: local integer udg_tempInteger
- Dialog - Change the title of DialogFog to Fog of War
- Dialog - Create a dialog button for DialogFog labelled Fog of War Off
- Set DialogFogOFF = (Last created dialog Button)
- Dialog - Create a dialog button for DialogFog labelled Fog of War On
- Set DialogFogON = (Last created dialog Button)
-
For each (Integer P) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GetLocalPlayer Equal to (Player(P))
-
Then - Actions
- Dialog - Show DialogFog for (Player(P))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Fog Picked
-
Events
- Dialog - A dialog button is clicked for DialogFog
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to DialogFogON
-
Then - Actions
- Set DialogFogONCount = (DialogFogONCount + 1)
- Dialog - Hide DialogFog for (Triggering player)
-
Else - Actions
- Set DialogFogOFFCount = (DialogFogOFFCount + 1)
- Dialog - Hide DialogFog for (Triggering player)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GetLocalPlayer Equal to (Triggering player)
-
Then - Actions
- Trigger - Run Create Ship Vote <gen> (checking conditions)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Create Second Vote
- Events
- Conditions
-
Actions
- Dialog - Change the title of DialogShips to Battleships Allowed
- Dialog - Create a dialog button for DialogShips labelled All Ships
- Set DialogShipsON = (Last created dialog Button)
- Dialog - Create a dialog button for DialogShips labelled Transports Only
- Set DialogShipsOFF = (Last created dialog Button)
- Dialog - Show DialogShips for GetLocalPlayer