Game Development Community

Loading new areas

by Lucas Dorrough · in Technical Issues · 06/19/2008 (6:25 pm) · 6 replies

Can you program it were it will load new areas, like in games for the ps2, so torque wont have to load the whole mission all at once.

#1
06/19/2008 (6:44 pm)
The whole mission is the area, I'm not sure what you're getting at. The mission file includes terrain data, any interiors, shapes, preciptation and sky effects, as well as loading any scripts used throughout the level. I don't see how you could function in a level without all of that.
#2
06/20/2008 (7:43 am)
Hi Lucas - indeed you can very easily get Torque to load new missions when you reach certain points in the mission.. the easiest way is to place a trigger in your mission file and then attach some code to that trigger that kicks off a load of the new mission.
#3
06/20/2008 (10:32 am)
Thaks, one more question is there a way that you can set a trigger to unable you to start that mission until you comeplet a task



I know i propably sound like a noob im only fourteen, but i can learn any type of software
#4
06/20/2008 (12:47 pm)
No problem sounding like a noob, these are good starting questions.

Yes, an easy way to do that would be with a global variable. You would first set the variable under whatever you need completed. Say you want the player to go into a large building which will be the next level, but not until they have killed a sniper. You would have in the function when the AI Sniper would die $sniperIsDead = 1, and in your trigger code, just begin it with
if ($sniperIsDead = 1) {
//whatever the trigger would do
}

You could have the if at the beginning of the trigger check for anything really, so you don't need global variables. You could just check whether the sniper has died with a few lines of script, or maybe if a certain item is in the inventory, etc...
#5
06/21/2008 (7:39 am)
Morrock hit the nail on the head there... we all started out as newbies at some point or another, it's a good community here
#6
06/21/2008 (9:20 am)
Thank you that really helped.