HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Server Split caused by dialogs?

01-19-2005, 09:45 PM#1
syko_serk
Hey, I am pretty experienced with the WE, however in my latest map creation I am experiencing a major problem with server splits. The split will occur at map startup. Now, I havent been able to pinpoint exactly the time it happens, but it is between 0 and 3 seconds of game elapsed time.
I have a dialog which is shown to player 2 at the startup, which is at 3 seconds of elapsed game time. I have a feeling this might be the problem, but I dont know for sure without doing a LOT of reworking in the map to test my theory.

My question is this:
Once player 2 selects a game mode (like normal or all pick or all random or something) then a new dialog is created for each player with their own variables for each player's dialog box. Each dialog is shown to the respective player within 1 second of time between each other. So player 3 sees his dialog, then 1 second later player 4 sees his and so on until everyone sees theirs. Is it possible that showing all these unique dialogs has anything to do with my server splits at startup?
I have also seen and read about people saying sending a message to only one player will split the game as well. Does that include using the trigger :
Game - Send Message to player (explicitely timed)

I use this at game start as well (.05 seconds elapsed).

Any help would be appreciated.
Oh, and my game type is AOS, selecting your race and such is why I have so many dialogs in the beggining.

Thanks to anyone who can help.
01-19-2005, 10:16 PM#2
Arohk
try to run the dialog after 10-20 seconds and see if it still happens when the dialog shows, so you can be sure the dialog couse the server split.
01-19-2005, 10:44 PM#3
syko_serk
I just did that, and tested with a full game.
Right as the first dialog pops up for player 2 and i pick the game mode, the server splits.

Might it have something to do with showing a specific dialog to one player?
I use specific dialogs and specific dialog buttons and show them to 'Player 2(Blue)' specifically.

I dont know much about what kinds of things cause problems with the dialogs, but I am assuming this could be the problem (being that a specific dialog was shown specifically to player 2 (blue) ).

Any ideas?
01-19-2005, 10:55 PM#4
Shark
when u said:
....then a new dialog is created for each player with their own variables for each player's dialog box ....

thats the problem.... you're using local variables and local things :) show the dialog to all players at the same time.....
try it out without the "specific" things and see if it works....
hope i helped :) im kinda grumpy and sleepy so i may not have the best helping mood...
01-19-2005, 11:10 PM#5
syko_serk
Hrmm. Kinda helpful. So I assume that local variables cannot be used for dialogs. How would I create a dialog which was global? I mean, in order for you to be able to show a dialog, it must be a variable otherwise you cannot know what button is clicked for a dialog.

Does using one single dialog with it's own variable solve that problem? So if I were to make one dialog, and have its buttons. And then show that same dialog to every player at the same time, it wouldnt split, right?
01-19-2005, 11:46 PM#6
Vexorian
Quote:
Originally Posted by Shark
when u said:
....then a new dialog is created for each player with their own variables for each player's dialog box ....

thats the problem.... you're using local variables and local things :) show the dialog to all players at the same time.....
try it out without the "specific" things and see if it works....
hope i helped :) im kinda grumpy and sleepy so i may not have the best helping mood...
you are way confused

local variables don't cause desyncs

it is what happens with stuff inside a check of GetLocalPlayer() which would cause desyncs. But the normal gui dialogs wouldn't cause desyncs.

What about showing the triggers here?
01-20-2005, 12:05 AM#7
syko_serk
Ok, I will post the triggers later tonight. I am late for work right now. But when I get back, I will psot them for you.
Thanks for helping.
01-20-2005, 08:57 AM#8
syko_serk
This trigger is the dialog that shows player 1 the game options: (sorry about the custome text, i dunno how else to paste gui into here.


function Trig_Blue_Game_Mode_Selection_Actions takes nothing returns nothing
call DialogSetMessageBJ( udg_BlueChooseOptions, "TRIGSTR_5049" )
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5050" )
set udg_NormalGameButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5051" )
set udg_AllPickButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5052" )
set udg_AllRandomButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5053" )
set udg_DeathmatchButton = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_BlueChooseOptions, ConvertedPlayer(2) )
call PolledWait( 15.00 )
call DialogDisplayBJ( false, udg_RaceDialog1, ConvertedPlayer(2) )
endfunction

//===========================================================================
function InitTrig_Blue_Game_Mode_Selection takes nothing returns nothing
set gg_trg_Blue_Game_Mode_Selection = CreateTrigger( )
call DisableTrigger( gg_trg_Blue_Game_Mode_Selection )
call TriggerAddAction( gg_trg_Blue_Game_Mode_Selection, function Trig_Blue_Game_Mode_Selection_Actions )
endfunction

This trigger is one of many which are close to identical except they each show a unique dialog for each player specifically. Pretty much the same dialog with different variables identifying the player it is created for:

function Trig_Blue_Game_Mode_Selection_Actions takes nothing returns nothing
call DialogSetMessageBJ( udg_BlueChooseOptions, "TRIGSTR_5049" )
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5050" )
set udg_NormalGameButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5051" )
set udg_AllPickButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5052" )
set udg_AllRandomButton = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_BlueChooseOptions, "TRIGSTR_5053" )
set udg_DeathmatchButton = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_BlueChooseOptions, ConvertedPlayer(2) )
call PolledWait( 15.00 )
call DialogDisplayBJ( false, udg_RaceDialog1, ConvertedPlayer(2) )
endfunction

//===========================================================================
function InitTrig_Blue_Game_Mode_Selection takes nothing returns nothing
set gg_trg_Blue_Game_Mode_Selection = CreateTrigger( )
call DisableTrigger( gg_trg_Blue_Game_Mode_Selection )
call TriggerAddAction( gg_trg_Blue_Game_Mode_Selection, function Trig_Blue_Game_Mode_Selection_Actions )
endfunction

I dont see anything wrong with these. Each of these triggers is run by each other basically, once the game is at about 3 seconds.
01-20-2005, 10:06 AM#9
Bibendus
Could you please post the GUI Triggers and not the generated code? That's really bad!
01-20-2005, 07:24 PM#10
syko_serk
How do you do that? I keep doing ctrl+c to copy the triggers and they copy the generated code. I cant seem to figure out how to get the gui triggers.
01-20-2005, 08:02 PM#11
oNdizZ
easy, :p when you select a trigger in the trigger editor, a small box with all the events conds. and actions appears on the lower right of your screen, just above the event you see the trigger name.
Right click on that and then "copy as text" i think it was. then only paste it in here, but do remember to use the [code] function or else it will be kinda messy