Add the end-screen for beating The Final Challenge to make the mission text true

TODO: record real voice for congrats.wav
This commit is contained in:
yellows111 2024-03-11 12:39:25 +00:00
parent d80a53951f
commit d1c43b6583
6 changed files with 56 additions and 3 deletions

View File

@ -83,12 +83,14 @@ function initClient()
exec("./ui/loadingGui.gui");
exec("./ui/optionsDlg.gui");
exec("./ui/remapDlg.gui");
exec("./ui/MOTDGui.gui");
//exec("./ui/MOTDGui.gui");
exec("./ui/EnterNameDlg.gui");
EnterNameDlg.preload();
exec("./ui/HelpCreditsGui.gui");
exec("./ui/ExitGameDlg.gui");
exec("./ui/MiniShotGui.gui");
// custom gui files
exec("./ui/congratsGui.gui");
// Client scripts
exec("./scripts/client.cs");
@ -104,7 +106,7 @@ function initClient()
exec("./scripts/centerPrint.cs");
exec("./scripts/game.cs");
exec("./scripts/version.cs");
// custom guis
// custom gui scripts
exec("./scripts/MarbleSkinSelectionDlg.cs");
// Default player key bindings

View File

@ -33,6 +33,11 @@ function clientCmdGameEnd()
return;
getBestTimes($Server::MissionFile);
if($Server::MissionFile $= "marble/data/missions/expert/timmysfork.mis") {
// if we've beaten The Final Challenge show the epic finale
gameIsCompleteSignalForEndGameGui(1);
Canvas.pushDialog(congratsGui);
}
$highScoreIndex = "";
for(%i = 0; %i < 3; %i++)
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -0,0 +1,38 @@
new GuiChunkedBitmapCtrl(congratsGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./congrats.jpg";
useVariable = "0";
tile = "0";
new GuiBitmapButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "center";
vertSizing = "top";
position = "280 415";
extent = "111 59";
minExtent = "8 8";
visible = "1";
command = "setPlayMissionGui();gameIsCompleteSignalForEndGameGui(0);";
accelerator = "escape";
helpTag = "0";
text = "play";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./play/play";
};
};
function congratsGui::onWake() {
if (!alxIsPlaying($WinSoundHandle))
{
$WinSoundHandle = alxCreateSource("AudioChannel0", expandFilename("~/data/sound/congrats.wav"));
alxPlay($WinSoundHandle);
}
}

View File

@ -36,7 +36,7 @@ new GuiControl(EndGameGui) {
allowColorChars = "0";
maxChars = "-1";
};
new GuiBitmapButtonCtrl() {
new GuiBitmapButtonCtrl(EndGameContinueButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
@ -70,3 +70,11 @@ new GuiControl(EndGameGui) {
};
};
//--- OBJECT WRITE END ---
function gameIsCompleteSignalForEndGameGui(%probably) {
if(%probably) {
EndGameContinueButton.command = "Canvas.popDialog(EndGameGui);";
} else {
EndGameContinueButton.command = "setPlayMissionGui();";
}
}

Binary file not shown.