Game Development Community

Splitting missions into sections with LAN support

by Jules · in Torque Game Engine · 03/30/2007 (2:20 am) · 3 replies

Is it possible to split one big mission that takes 2 minutes to load up into smaller missions with trigger zones, but also keep LAN support? If not, how would I disable "Host Multiplayer" for just this mission so that it is for Single player only, but maintaining LAN support for another mission that is setup for Network play?

#1
03/30/2007 (3:39 am)
Ok, worked out how i'm going to do it... if LAN is not supported on seperating the mission files.

For single player...seperate the large mission into smaller missions, add trigger points to the available entry/exit points.

For LAN support, remove the triggers.

How would I go about removing the triggers for multiplayer LAN and dedicated server?

if (game is single player)
include triggers
else
do nothing?

Anyone with a bit of code on this would be much appreciated.
#2
03/30/2007 (3:55 am)
By default Torque uses these variables to flag a game as single player, multiplayer or dedicated.
$pref::HostMultiPlayer
   $Server::Dedicated
You can see an example of this in startMissionGui.gui
if ($pref::HostMultiPlayer)
      %serverType = "MultiPlayer";
   else
      %serverType = "SinglePlayer";
So you can make your decisions based upon that.
#3
03/30/2007 (4:20 am)
Thanks Tim. This puts me in the right direction...

Jules