by DilloDude » Mon Mar 03, 2008 10:39 am
Saving a game is fairly simple. First you just decide what needs to be saved. It might be something simple, like just which level you're up to. Or maybe something more complicated with coordinates. Perhaps an integer that stores which levels are completed. Maybe an array of levels, with the score for each one. For some types of things, you might want to consider writing your own save/load script. For most pregress saving things, though, you just need to create your variables and stick 'em in a save group. When you want to save, copy across any variables that need copying (like x and y - other values can be stored in the actual variables) and use saveVars. When you load, use loadVars (If you have more than one saved game in separate files, you may want to check if the file exists with another variable) and copy back the appropriate data and respond accordingly.