Game Development Community

Skip the startup screen!

by Chris Garrett (CG) · in Torque Game Engine · 08/19/2003 (10:04 am) · 3 replies

OK I don't like spending the time to click "start mission", "scorched earth", "load" just to test a little change(Yeah I'm lazy). So I decided to change this. Here's how you can do it:


edit "example\fps\client\init.cs"

around line 97:

replace:

// Start up the main menu... this is separated out into a
// method for easier mod override.
loadMainMenu();



with:

// CG: if a mission is passed then load it, skipping menu screen
if ($missionArg !$= "") {
if ($pref::HostMultiPlayer)
%serverType = "MultiPlayer";
else
%serverType = "SinglePlayer";

createServer(%serverType, $missionArg);
%conn = new GameConnection(ServerConnection);
RootGroup.add(ServerConnection);
%conn.setConnectArgs($pref::Player::Name);
%conn.setJoinPassword($Client::Password);
%conn.connectLocal();
} else {
// Start up the main menu... this is separated out into a
// method for easier mod override.
loadMainMenu();
}


to use this run at the command line:
torqueDemo.exe -mission fps/data/missions/scorchedPlanet.mis

#1
08/19/2003 (10:19 am)
Great, I was just thinking about this the other after I entered my mission for the 168'th time that day to check something out.

Alot of time is saved with this little trick :)

I would like to add to this that Alt+F4 closes the game so fast you cant believe it, another timesaver :)

Karsten "Clocks" Viese
#2
08/19/2003 (11:18 am)
Chris,

You should post this as a resource ... to make it easier for n00bs like me to find.

Thanks.

Alex