Deleting a script file from script...
by Morphonix LLC · in Torque Game Engine · 05/05/2005 (5:23 pm) · 2 replies
Here's the scenario...
For saved games, I have a SimGroup "SaveData" which contains all of my persistent objects needed to save and restore a game.
By doing something like "SaveData.save(%filename);" I can save my games.
Conversely, "SaveData.delete(); exec(%filename);" (and some other stuff...) I can restore a game.
Now... Since this game will eventually be released commercially, I don't really want to allow the player to read and modify the saved game file (easily, anyway), so after saving I can "compile(%filename);".
The problem is that the original saved game .cs file is still there, and I want to delete it. Is there a way to do this from Torque script? I've been looking and can't seem to find one.
- OR -
Is there a way to emit the compiled version directly?
For saved games, I have a SimGroup "SaveData" which contains all of my persistent objects needed to save and restore a game.
By doing something like "SaveData.save(%filename);" I can save my games.
Conversely, "SaveData.delete(); exec(%filename);" (and some other stuff...) I can restore a game.
Now... Since this game will eventually be released commercially, I don't really want to allow the player to read and modify the saved game file (easily, anyway), so after saving I can "compile(%filename);".
The problem is that the original saved game .cs file is still there, and I want to delete it. Is there a way to do this from Torque script? I've been looking and can't seem to find one.
- OR -
Is there a way to emit the compiled version directly?
About the author
Torque Owner Adam Larson