Making a game
by Josh Klev · in Torque Game Engine · 09/26/2007 (2:18 am) · 5 replies
I have made a small game the one in the getting started tutorial that comes with TGE but now ive made a world and i made it into the demo thing... i made it so i could open it with pressing f11 at the game i made in tutorial base but how do i make it load that game instead of the one i made when following the tut?
About the author
#2
09/26/2007 (10:56 pm)
. . . i havent done anything extra where do i get this...FUNCTION
#3
Indeed, the loadMyMission function is at the bottom of the main.cs inside tutorial.base.
@Josh
The tutorial has all the info for creating a button that starts your mission. At the bottom of main.cs is this function:
09/28/2007 (4:05 pm)
@SteveIndeed, the loadMyMission function is at the bottom of the main.cs inside tutorial.base.
@Josh
The tutorial has all the info for creating a button that starts your mission. At the bottom of main.cs is this function:
function loadMyMission()
{
. . . . . . . . . . . . . . . . . . . .
// make sure we are not connected to a server already
disconnect();
// Create the server and load the mission
createServer("SinglePlayer", expandFilename("./data/missions/gameonemission.mis"));
// Make a local connection
%conn = new GameConnection(ServerConnection);
. . . . . . . . . . . . . . . . . . . .
}When called, this function loads "gameonemission.mis". You can change this if you like.
#4
06/16/2008 (8:02 pm)
I would like to know the function that loads a specific level as opposed to loading the one specified for loadMyMIssion...
#5
Now there's a good name for a function that loads missions ;)
A lot of functions in TGE have useful names like that, so a few mins of digging with a search of your code can probably answer a lot of questions like this.
06/17/2008 (8:49 am)
Benjamin - You could have answered this yourself having found this thread, as you can see in the above example you found the createServer() command passes in the mission name, search through your project and read through that createServer() function and you'll see it calls a function called loadMission() Now there's a good name for a function that loads missions ;)
A lot of functions in TGE have useful names like that, so a few mins of digging with a search of your code can probably answer a lot of questions like this.
Torque Owner Steve D