Arch
Legions Developer
I'm trying to port some of the gui files of the game into scripts that can be placed into the mods folder and be used. Currently, I'm working on the scoreboard, as seen below.
I've come across a problem though. The scoreboard itself doesn't refresh correctly. By refresh I mean the ping stays solid and the score(s) aren't added to the scoreboard. I know the image above is from a custom match. The ping stays solid on non-custom run matches as well (Public test, Hotswap, etc.). However the scoreboard does refresh on certain activities. Such as capturing a flag: it goes to the normal fluctuation of ping and adds the score to the scoreboard. The ping continues to fluctuate for about a minute or so and then goes back to the steady/solid ping as before. Re-spawning also refreshes the ping and score.
So, my question is: Is there a way to force the scoreboard to refresh?
Here's the script:

I've come across a problem though. The scoreboard itself doesn't refresh correctly. By refresh I mean the ping stays solid and the score(s) aren't added to the scoreboard. I know the image above is from a custom match. The ping stays solid on non-custom run matches as well (Public test, Hotswap, etc.). However the scoreboard does refresh on certain activities. Such as capturing a flag: it goes to the normal fluctuation of ping and adds the score to the scoreboard. The ping continues to fluctuate for about a minute or so and then goes back to the steady/solid ping as before. Re-spawning also refreshes the ping and score.
So, my question is: Is there a way to force the scoreboard to refresh?
Here's the script:
Code:
function EscapeMenuGui()
{
new GuiControl(PauseGui)
{
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "SyncMenuBG";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiControl()
{
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "SyncTransBG";
HorizSizing = "left";
VertSizing = "center";
position = "-200 0";
Extent = "151 234";
minExtent = "151 234";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiBitmapButtonCtrl(ResumeGameButton)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 0";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "escape";
helpTag = "0";
text = "Resume";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(RespawnButton)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 30";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Respawn";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(JoinTeam1Button)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 60";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Join Beta";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(JoinTeam0Button)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 90";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Join Alpha";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(LoadoutsButton)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 120";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Loadouts";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(GamePanelButton)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 150";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Game Panel";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(InGameOptionsButton)
{
class = "OptionsButton";
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 180";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Options";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
new GuiBitmapButtonCtrl(LeaveGameButton)
{
profile = "MenuTextButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "0 210";
extent = "152 25";
minExtent = "152 25";
visible = "1";
accelerator = "";
helpTag = "0";
text = "Leave game";
bitmap = "mods/autoexec/Sync/Buttons/menuButton";
};
};
new GuiControl()
{
isContainer = "1";
modal = "false";
profile = "SyncMenuBG";
horizSizing = "center";
vertSizing = "bottom";
position = "0 0";
extent = "10000 25";
new GuiMLTextCtrl()
{
profile = "SpeedDisplayProfile";
horizSizing = "center";
vertSizing = "center";
extent = "10000 10";
position = "0 5";
text = "<just:center>" @ "Scoreboard";
};
};
new GuiMLTextCtrl(ScoreboardHeader)
{
profile = "ScoreHeaderTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "0 75";
extent = "600 22";
minExtent = "600 22";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
};
new GuiMLTextCtrl(ScoreboardSubHeader)
{
profile = "ScoreHeaderTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "0 100";
extent = "600 22";
minExtent = "600 22";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
};
new GuiScrollCtrl(ScoreboardContent)
{
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "SyncTransBG";
HorizSizing = "center";
VertSizing = "height";
position = "0 125";
Extent = "600 278";
MinExtent = "600 278";
canSave = "1";
Visible = "1";
hovertime = "1000";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
childMargin = "0 0";
};
};
GameHud.add(EscapeMenuGui);
}
package SyncGuiPack
{
function HudOverlay::AddHudElements(%this)
{
parent::AddHudElements(%this);
EscapeMenuGui();
}
};
activatepackage(SyncGuiPack);