Loading a GUI and Mission
by Andrew Van Orden · in Game Design and Creative Issues · 04/01/2007 (2:20 pm) · 2 replies
I have a problem that I was hoping someone can help me with. I have two things that I am trying to implement. The first thing I want to do is load a custom GUI onto the screen right after the Garage Games Logo, a title screen basically. This GUI has a button that I want to load my first mission. This is the other thing that I need to know, what the command is to load the mission.
I have a little experience with the Torque game engine but I am pretty much new to making an actual game. If you need any additional information, please let me know. Hopefully this is pretty basic and any help you can give me will be greatly appreciated.
I have a little experience with the Torque game engine but I am pretty much new to making an actual game. If you need any additional information, please let me know. Hopefully this is pretty basic and any help you can give me will be greatly appreciated.
About the author
#2
1. Take a look at "starter.fps/client/UI/startupGui.gui". This is the script that loads the splash screen, then moves the player onward to the mainMenuGui. At the very bottom is this function:
Change "loadMainMenu();" to load your menu and make the appropriate datablock to go with it.
2. I'm not to sure about this one. If you look at joinServer.Gui, you'll find they have a function called "join" that is called to load the game. (down at the bottom of the script) I would start there and also compare it to startMissionGui.gui.
04/04/2007 (2:35 am)
To answer your questions as best I can, (I'm no expert)1. Take a look at "starter.fps/client/UI/startupGui.gui". This is the script that loads the splash screen, then moves the player onward to the mainMenuGui. At the very bottom is this function:
function checkStartupDone()
{
if (StartupGui.done)
{
echo ("*** Load Main Menu");
loadMainMenu();
}
else
schedule(100, 0, checkStartupDone );
}Change "loadMainMenu();" to load your menu and make the appropriate datablock to go with it.
2. I'm not to sure about this one. If you look at joinServer.Gui, you'll find they have a function called "join" that is called to load the game. (down at the bottom of the script) I would start there and also compare it to startMissionGui.gui.
Andrew Van Orden
exec("./ui/sTitleScreen.gui");
and then I used this to get it to run:
function loadMainMenu()
{
// Startup the client with the Main menu...
Canvas.setContent( sTitleScreen );
checkAudioInit();
Canvas.setCursor("DefaultCursor");
}
I still need help with the second part though, if anyone has any ideas.