Setting starting mission in FPS Demo (How??)
by Gleznov · in Technical Issues · 08/09/2005 (3:38 pm) · 1 replies
Hi,
I've created a new mission I'd like to have run when I execute torquedemo.exe. I've gone through all the scripts but I can't find anywhere where "Stronghold.mis" is defined as the starting mission. I've searched .cs files and .gui files, but no good. What have I missed? And when I saved my new mission, it didn't put it in the "Missions" subdirectory, it put it in the data directory - why is that?
Glez
I've created a new mission I'd like to have run when I execute torquedemo.exe. I've gone through all the scripts but I can't find anywhere where "Stronghold.mis" is defined as the starting mission. I've searched .cs files and .gui files, but no good. What have I missed? And when I saved my new mission, it didn't put it in the "Missions" subdirectory, it put it in the data directory - why is that?
Glez
Torque Owner Vernon Finch
In the starter.fps mod, it looks in the directory starter.fps/data/mission and creates a list of missions in that directory to choose from when you start up.
If you want it to force a certain mission and give no choice, you can see what the tutorial.base mod has done in its main.cs file.
function loadTestMission() { // Create the server and load the mission createServer("SinglePlayer",expandFilename("./data/missions/test1.mis")); // Make a local connection %conn = new GameConnection(ServerConnection); RootGroup.add(ServerConnection); %conn.setConnectArgs("Player"); %conn.setJoinPassword("None"); %conn.connectLocal(); }You can then have your start game button (or whatever button you want) call that function.
Hope that helps.