Game Development Community

Gui Mission Select

by Brian Kirchgessner · in Torque Game Engine · 10/23/2007 (3:07 pm) · 1 replies

I have finally gotten player select working but I was wanting to create a mission selection gui similar to the old Star Wars: Jedi Power battles game.

Ive gotten a bitmap button to load the mission, but if I delete the guicontrol with sm_missionlist it stops working. Ive looked at the code and (not being much of a coder) have figured out that the sm_startmission is linking with it but I dont understant how to find the files and just use it on click.

can anyone explain to me how to get a simple bitmap control working, without having to have the sm_missionlist, or point me to a direction I can follow.

If I havent made it very clear please tell me.

Also does anyone know if you can link a bitmap into a guiscroll so it scrolls the bitmaps and not text>

Thanks

#1
10/24/2007 (1:54 pm)
Figured it out, had to make a file called missionload.cs which holds all the mission loading data.

function SM_barebones()
{
   // make sure we are not connected to a server already
   disconnect();
   
   // Create the server and load the mission

   if ($pref::HostMultiPlayer)
      %serverType = "MultiPlayer";
   else
      %serverType = "SinglePlayer";

   createServer(%serverType, expandFilename("./data/missions/barebones.mis"));

   // Make a local connection
   %conn = new GameConnection(ServerConnection);
   RootGroup.add(ServerConnection);
   %conn.setConnectArgs($pref::Player::Name, $pref::Player::jtPlayerBody);
   %conn.setJoinPassword($Client::Password);
   %conn.connectLocal();
}
Ive tried sticking it in the Client folder and the Server folders but the only place it loads correctly is in the starter.fps folder with the main.cs