Game Development Community

Loading different missions with trigger

by DreamPharaoh · in Technical Issues · 02/21/2008 (8:28 pm) · 10 replies

I currently have a trigger that teleports me to the cave I am making (because in TGEA you can't poke holes yet in the terrain). This cave is based off of an old board game that me and my friends used to play. This cave is huge though, and now I realize I need to split it up into at least 3 seperate missions for the FPS rate to remain stable on my shuttle computer. I need to know how I can have a trigger load the next mission and delete the last mission, if possible.

Thank you for any suggestions.

#1
02/21/2008 (8:54 pm)
Suggestions?

Well firstly i suggest you look at this
www.garagegames.com/blogs/40622/14207

Take a look at the video linked to it.

That'd take care of needing "holes in the terrain"
#2
02/21/2008 (9:26 pm)
Cool alternative to the holes in the terrain! Thank you for this, but unfortunatly it doesn't fix the FPS issues because the cave is so big -- the cave needs to be seperted into seperate missions to work properly.
#3
02/22/2008 (12:50 pm)
Is it a gigantic single cave, or a network of caves?
If it's a network, then I must be missing something here because I thought that's what portals were for, breaking up interiors into zones that don't even start to render if the player can't see them.

I'm wondering because I can't see how a huge single cave could possibly work broken into different missions.
#4
02/22/2008 (5:02 pm)
The cave is one gigantic cave that spans a few miles. I was able to find this code which has solved the issue.

//Trigger to switch missions

datablock TriggerData (Trigger2SwapMission)
{
tickPeriodMS = 100;
};

function Trigger2SwapMission::onEnterTrigger(%this,%trigger,%obj)
{

%client = %obj.client;
if(!%client)
{
// return if not a client
// we do not want any npc or other players walking into our trigger and seting off the swap mission
return;
}

%ZoneName = "missions/simple2.mis"; // mission name **** Change me to your mission name****
%SpawnPoint = %trigger.SpawnPoint; // Spawn Point in mission

echo("Zone client:" SPC %client SPC "to" SPC %ZoneName SPC "at" SPC %SpawnPoint);
schedule( 0, 0, loadMission, "terrain_water_demo/data/" @ %ZoneName,false,%SpawnPoint);
//If you are using starter.fps, change the path above from game/data //to starter.fps/data/

}
_______________________________

The next issue is getting the spawn point to be dynamic because I will spawn where ever the original spawn point (at the entrance) of the particular section/mission of the cave. So when a player decides "I want to go back", they will spawn at the entrance of the section instead of the end point. I thought of making seperate missions for these senerios but then it is getting a little too complicated to track. I guess I need to learn how to make a database save the last position and transmit this at the beginning of the spawnpoint creation.
#5
02/24/2008 (6:59 am)
The issue you are going to have with the triggered mission is while attempting to play multiplayer. In multi, if one person hits the trigger, it drags All other players in the game with them. If your cave is a dif object, you could just add portals to section it off. That would cut down on a lot of the cost. Now, if you are planning on a single player game, and the switch mission trigger works for you, then please ignore the above.

As for your spawn issue:
You could add multiple spawn points. 1 at each junction. Set a trigger in place to grab when the player goes thru it, and write that down in a text page. Then, when the player wants to return, You just grab the position from the text page and send him back.
#6
02/24/2008 (7:52 am)
Constructer does not allow me to add portals for some reason without crashing the system -- it seems to be related to the detail brushes that I put in, so this will be my next test. I can add portals to very simple objects, but that is it so far, and I can only export with "Export as DIF" -- the other export functions allow an export but TGEA will crash as soon as loaded. All of this has forced me to conclude that a 1 player game should be a more realistic goal right now.

The suggestion for the spawn issue is a good one. I have seen something simular in the books that I have. This will kill to birds with one stone because once I learn this then I can track player progression as well (level ups, saving the game, experience, NPC intereactions ect.).
#7
02/24/2008 (12:32 pm)
Constructor is too cluncky for my use. I use DeleD with the torque exporter instead.

Quote:The suggestion for the spawn issue is a good one. I have seen something simular in the books that I have. This will kill to birds with one stone because once I learn this then I can track player progression as well (level ups, saving the game, experience, NPC intereactions ect.).
Exactly. It will save using a database until you actually need it.
Some day, I may figure out how to teleport single players in a multiplayer environment.
#8
02/24/2008 (5:44 pm)
DeleD looks awesome. I am going to try the free version out. Thank you for the alternative -- it appears that I will need to take a route such as this since I am having so many issues with Constructer (although greatly appreciated app). I am just wondering how this polysoup direction, that they are taking, is going to alter things for DIF's. I would hate to spend 80 dollars only to find out that I can no longer use the DeleD with Torque exporter.
#9
02/25/2008 (2:33 am)
If they go with polysoup, then you would need to export your objects as obj and conver them to dts in milkshape or another app. (that's how I make dts objects)
#10
02/25/2008 (9:10 am)
For some reason I missed that they are making everything into DTS objects with polysoup -- so it looks like your right, it would be a simple conversion process.

Thank you for direction on this. I think I see the light at the end of the tunnel (no pun intended).


Polysoup resource:
http://www.garagegames.com/blogs/8863/13709