Author Topic: Change Map Trigger?  (Read 1758 times)

Ok then.

Try this:
Code: [Select]
datablock TriggerData(NextMap)
{
   tickPeriodMS = 100;
};

function NextMap::onEnterTrigger(%this, %trigger, %obj)
{
   if( !$loadedPlanetCave )
   {
      $loadedPlanetCave = true;
      messageAll('', '\c2Standby ... Loading next level.');
      schedule(10,0,"loadMission",base/data/missions/planetcave.mis");
   }
}

I'm thinking that since loadMission clears all the objects, an object doesn't like to be deleted inside a script callback sometimes, and crashes the game. So scheduling it until it happens outside the callback should prevent the crash.

You crash Blockland with a C++ crash XDNever mind that, my problem.
I enter the trigger and nothing happens now.
« Last Edit: May 01, 2008, 09:34:05 AM by Packer »

Have you tried deleting all objects in the missiongroup? Rotondo and I would crash if we didn't add our bots to the group when we changed the map.

Sorry, made an error.


Code: [Select]
datablock TriggerData(NextMap)
{
   tickPeriodMS = 100;
};

function NextMap::onEnterTrigger(%this, %trigger, %obj)
{
   if( !$loadedPlanetCave )
   {
      $loadedPlanetCave = true;
      messageAll('', '\c2Standby ... Loading next level.');
      schedule(10,0,"loadMission","base/data/missions/planetcave.mis");
   }
}

Sorry, made an error.


Code: [Select]
datablock TriggerData(NextMap)
{
   tickPeriodMS = 100;
};

function NextMap::onEnterTrigger(%this, %trigger, %obj)
{
   if( !$loadedPlanetCave )
   {
      $loadedPlanetCave = true;
      messageAll('', '\c2Standby ... Loading next level.');
      schedule(10,0,"loadMission","base/data/missions/planetcave.mis");
   }
}
That works perfect, thanks heaps :D