Chaining Mission Files
by Ian Dale · in Torque Game Engine · 12/20/2004 (1:31 am) · 9 replies
Your character is in a game. You move your character to a specific area on the terrain, or it could be a door, and when that character enters that specific zone a new mission is loaded, kind of like a the next level.
Is there any special function that's designed specifically for this purpose? Or would I have to use the trigger area functions?
Regards,
Is there any special function that's designed specifically for this purpose? Or would I have to use the trigger area functions?
Regards,
About the author
#2
Thanks very much. The resource worked like a charm.
However, does anyone know if there are any gotcha's when changing missions like this. For instance does any garbage collection need to be done (ie residue objects from the previous mission).
Also, my desire to be able to load different missions is because I'm developing an adventure game. Hence I will require the ability to go back and forth between missions.
I've already been able to achieve that with this resource but have a few niggles:
1) When the new mission loads, it shows the startup menu with the progress bar. Is this behaviour built in? If so what function can I override to remove it?
2) When loading a new mission, is there a simple way to make the screen fade out then fade in to the new mission, rather than having a progress bar showing?
Any help will be greatly appreciated.
Regards,
12/20/2004 (10:01 pm)
Billy,Thanks very much. The resource worked like a charm.
However, does anyone know if there are any gotcha's when changing missions like this. For instance does any garbage collection need to be done (ie residue objects from the previous mission).
Also, my desire to be able to load different missions is because I'm developing an adventure game. Hence I will require the ability to go back and forth between missions.
I've already been able to achieve that with this resource but have a few niggles:
1) When the new mission loads, it shows the startup menu with the progress bar. Is this behaviour built in? If so what function can I override to remove it?
2) When loading a new mission, is there a simple way to make the screen fade out then fade in to the new mission, rather than having a progress bar showing?
Any help will be greatly appreciated.
Regards,
#3
it would be interesting to know what steps and such where needed to create an adventure game in Torque.
On a side note... Whats a niggle?
12/20/2004 (11:16 pm)
I would love to hear about how this turns out. it would be interesting to know what steps and such where needed to create an adventure game in Torque.
On a side note... Whats a niggle?
#4
This is a normal gui that can be edited with the gui editor. It should be listed as "loadingGui." You can also look at the file directly, it should be located at:
/starter.fps/client/ui/LoadingGui.cs
Missions take some time to load, so you probably don't want to remove it completely. If you do, your users will think that the game is locked up when really it's just loading a mission. It shouldn't be too difficult to make it a bit more subtle, though.
12/20/2004 (11:32 pm)
To answer question #1, what you are seeing is the loading gui. This is a normal gui that can be edited with the gui editor. It should be listed as "loadingGui." You can also look at the file directly, it should be located at:
/starter.fps/client/ui/LoadingGui.cs
Missions take some time to load, so you probably don't want to remove it completely. If you do, your users will think that the game is locked up when really it's just loading a mission. It shouldn't be too difficult to make it a bit more subtle, though.
#5
Thanks for the info.
Charlie,
To me a niggle is an annoyance (in my terminology).
Regards,
12/20/2004 (11:43 pm)
Drew,Thanks for the info.
Charlie,
To me a niggle is an annoyance (in my terminology).
Regards,
#6
How do I make a player drop point relate to the map the character is coming from? Right now, if there's multiple drop points, you will randomly go to one. Sort of messes up the continuity of the game, lol. If I figure it out I'll post it, but in the meanwhile... hmmmm
01/23/2005 (12:13 am)
This is a great resource, I also managed to get rid of the scoreboard and delay between map loadings. Just one thing, little detail I need to figure out. Or if somebody already has I'd love to see a code snippet on how to go about it. How do I make a player drop point relate to the map the character is coming from? Right now, if there's multiple drop points, you will randomly go to one. Sort of messes up the continuity of the game, lol. If I figure it out I'll post it, but in the meanwhile... hmmmm
#7
Play around with ClearTextureHolds(); and PurgeResources(); to get rid of the data from the old mission.
@Don Bates:
You should get rid of those drop points completely, or at least the system of randomly placing.
Upon entering the mission, just drop the player wherever he needs to be dropped depending on where he left on the old map, save it as a global somewhere.
01/23/2005 (3:01 am)
Just make sure you're careful with how much you're loading and dropping at each mission-change.Play around with ClearTextureHolds(); and PurgeResources(); to get rid of the data from the old mission.
@Don Bates:
You should get rid of those drop points completely, or at least the system of randomly placing.
Upon entering the mission, just drop the player wherever he needs to be dropped depending on where he left on the old map, save it as a global somewhere.
#8
Are there any changes necessary to teleport multiplayer?
We are also working on a Social game that requires people to change from one environment to another like changing clothes.
09/01/2007 (6:14 pm)
The code referenced above has "Single Player" written all over it.Are there any changes necessary to teleport multiplayer?
We are also working on a Social game that requires people to change from one environment to another like changing clothes.
#9
for instance, if a mission has several jump point (triggers leading to other missions) each trigger would be tied to a specific spawn point on a specific mission file.
This is kinda required for my game. it would be nice to know before i work this in if i would need to write some script to make it work in a mp environment.
09/01/2007 (6:37 pm)
That is a good question magra, even though this thread is kinda old now i would like to know before i implement this if it is network friendly. THe game i am working will require some exact respawning as Magra said. for instance, if a mission has several jump point (triggers leading to other missions) each trigger would be tied to a specific spawn point on a specific mission file.
This is kinda required for my game. it would be nice to know before i work this in if i would need to write some script to make it work in a mp environment.
Torque 3D Owner Billy L
click