Unload Files
by Nathan Kent · in Torque Game Engine · 06/15/2008 (8:28 am) · 2 replies
Is it possible to unload TorqueScript files from memory? I know that I could use packages, but for what I want, that would be a little awkward. Let me explain:
I want to make an RPG with Torque, and what I would like to do is have a file hierarchy similar to this.
What I would like to do is "unload" the code and datablocks for the zones that aren't in use. If I did that, the game would have less overhead, and I could have a method for AIPlayer be different in each zone. I would like to be able to use it similar to
If anyone could tell me how to do this, or where to start, I'd appreciate it!
I want to make an RPG with Torque, and what I would like to do is have a file hierarchy similar to this.
|Zone1->Scripts&Datablocks <- Code specific for zone1
|Zone2->Scripts&Datablocks <- Code specific for zone2
Root->Game->Server->Scripts->|Common->Scripts&Datablocks <- Code that all zones need (Player, spells, etc)
|Zone3->Scripts&Datablocks <- Code for zone3
|Zone4->Scripts&Datablocks <- Code for zone4What I would like to do is "unload" the code and datablocks for the zones that aren't in use. If I did that, the game would have less overhead, and I could have a method for AIPlayer be different in each zone. I would like to be able to use it similar to
unloadFolder(%client.currentZone); //<- ?? loadFolder(%nextZone); //<-Could be just executing every script in folderIt would be similar to activating and deactivating packages, but I wouldn't want to use packages for every single script file I put in the folder. It would be ideal if I could just drop script files in the folder and not have to worry about making sure that I deactivate it's package when out of the zone, and reactivating it when going back in.
If anyone could tell me how to do this, or where to start, I'd appreciate it!
About the author
#2
Still have no clue, but still searching. I've been looking into reversing the exec function, but I'm not having any luck at understanding it.
08/12/2008 (6:03 pm)
BumpStill have no clue, but still searching. I've been looking into reversing the exec function, but I'm not having any luck at understanding it.
Torque Owner Nathan Kent