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
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
#2
You should post this as a resource ... to make it easier for n00bs like me to find.
Thanks.
Alex
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
#3
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4533
08/21/2003 (7:20 am)
Ok I created a resource(my first!!) for it: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4533
Torque Owner Karsten "Clocks" Viese
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