knucklecrunchgames wrote:I think I half understand it, but can you make it a bit more simple for me to understand,
You understand how to save the player's position in a single .dat file already. All you do is save the variables, that way when you load up the dat file you can load the saved variables and update the player's position to the correct spot.
Now that you have multiple .dat files for the multiple levels, you need to also remember which level file the player is in. To do this you can have one more variable that you keep track while saving and loading. This variable holds the name of the .dat file the player is currently in.
The player starts a new game. As the game loads it saves the name of the file into your save file. If the player wants to take a break, they exit the game and you save their position within the level. Now the player starts the game and selects load game. In the menu it loads the save file and now has the name of the file it needs to load, and calls LoadGame on it. The player then beats the level and moves onto the next one. Just like with level one when the player enters the level it saves the name of the current level file into your save file. That's it.