Game Development Community

Resetting/loading a mission

by Jendrik Posche · in Torque Game Engine · 08/05/2008 (9:12 am) · 1 replies

Hi all,

i have a problem with loading a mission from a mission. I have an object call Foo in both missions, when i load mission2 from mission 1 , torque somehow retains all transforms/textures on Foo which is undesirable.

At the moment, i'm killing the entire server and restart it, to reset the transforms, However killing the server is very undesirable, i think you can come up with the reasons for this.

Also when i use resetmission(); the transform stay the same. To me this is not really a reset.

any ideas how i can (re)load a mission so that the mission actually reloads itsself from scratch without me having to destroyserver() ?

Regards,

#1
08/05/2008 (11:52 am)
Inside "function destroyServer()" I see it doing this (among other things)..

// Delete all the server objects
   if (isObject(MissionGroup))
      MissionGroup.delete();
   if (isObject(MissionCleanup))
      MissionCleanup.delete();
   if (isObject($ServerGroup))
      $ServerGroup.delete();

That deletes all objects on the server (which would also cause them to be deleted for all clients), if thats what you want to do.