Problems with Trigger initiated missions
by DreamPharaoh · in Artist Corner · 02/24/2008 (9:40 pm) · 0 replies
I have TGEA. The Simple.mis file works fine with loading any .atlas or .ter file for the land. I have a trigger that teleports me into a new mission. I use this for my extremely large cave. This cave is so big that to maintain the FPS I had to separate it into 5 separate missions using this trigger function (I will post this script below to help any individual outside of this post). Unfortunately it will not allow me to load a different atlas file or any other terrain file -- TGEA crashes at the trigger collision (it works fine if I maintain the original .atlas file). I can even load Simple.mis without a terrain and it will load fine -- all of the terrains I have loaded without a crash at the beginning, but if I put a different terrain in the separate .mis file that the trigger iniates, it will crash.
I do not understand why this is happening. I wanted either a very small terrain or no terrain with the cave.mis files to eliminate unneeded CPU possessing, but now I realize that I may not be able to load separate .mis files if the terrain needs to be separated because of complexity of houses, npc's, monsters, ect that roam that particular part. Any direction is appreciated.
// MISSION TRIGGER SCRIPT
//___________________________________________________________________-
//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 = %trigger.ZoneName; // 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/
}
//___________________________________________________________________-
I do not understand why this is happening. I wanted either a very small terrain or no terrain with the cave.mis files to eliminate unneeded CPU possessing, but now I realize that I may not be able to load separate .mis files if the terrain needs to be separated because of complexity of houses, npc's, monsters, ect that roam that particular part. Any direction is appreciated.
// MISSION TRIGGER SCRIPT
//___________________________________________________________________-
//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 = %trigger.ZoneName; // 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/
}
//___________________________________________________________________-
About the author
If you want to learn more, please go to my website. GodsandNemesis.com.