irei1as Posted May 26, 2015 Share Posted May 26, 2015 Let's say I have a set of variables I want to save for later called "$score::XXX" (XXX being different variables).For saving that data I'm doing right now:export("$score*","score"); //create uncompiled score file compile("./score",true); //create compiled score.dso fileDelete("./score"); //deletes the intermediate uncompiled file And then when I restart the game and I want to load the scores I do:(pseudocode)if(isFile("score.dso")) exec("score.dso"); else save not found, show warning can't load; ... but I'm not very comfortable with having to use fileDelete and intermediate uncompiled files.Is there any way to directly use export() towards a compiled dso?Or better, is there a resource about saving and loading data files? I'm not having luck with google. Quote Link to comment Share on other sites More sharing options...
rlranft Posted May 28, 2015 Share Posted May 28, 2015 Yeah, or you could stick all of those pieces of data on a ScriptObject and just write that out/read it back in. Or however you like.Hell, in order to save the player's (and AI units') position, I just move the spawn points to the actors' positions/rotations and resave the level in a new save location (in My Documents//Saves/), and save the data in another file along side it. That way the whole package is saved in one spot without muddying up the original data.Many ways to skin this cat, entirely up to you. Quote Link to comment Share on other sites More sharing options...
irei1as Posted May 28, 2015 Author Share Posted May 28, 2015 Thank you very much for the resource links and the input!They're quite clever approachs using how T3D handles object information. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.