Save States for Time Loops
Posted: Tue Nov 23, 2021 1:16 pm
Hi Tony,
I have a question on saving/variables. I've dug into the Dialogue System's saves a little bit already, but I wanted to ask your advice before implementing a full system to minimize the chances of my messing it up.
The game I'm working on is a time loop, and as such I'm going to have a fair number of world state variables I need to keep track of between loops, but there are also some variables that I'd like to reset each loop. I was wondering what the best way for me to handle this is.
For some additional context, the game exists in one scene, and the loop is 'reset' by reloading that scene. However, because of the way the Dialogue Manager isn't destroyed between scenes none of the variables are being reset. Currently I'm thinking it might be best to have a script that, at the start of each loop, goes through and manually sets all the variables that I want to be reset at the start of loops to their starting values.
I was wondering if you thought that was a decent implementation, or if there's an easier/better way to flag a whole set of variables to be reset.
Thanks so much!
I have a question on saving/variables. I've dug into the Dialogue System's saves a little bit already, but I wanted to ask your advice before implementing a full system to minimize the chances of my messing it up.
The game I'm working on is a time loop, and as such I'm going to have a fair number of world state variables I need to keep track of between loops, but there are also some variables that I'd like to reset each loop. I was wondering what the best way for me to handle this is.
For some additional context, the game exists in one scene, and the loop is 'reset' by reloading that scene. However, because of the way the Dialogue Manager isn't destroyed between scenes none of the variables are being reset. Currently I'm thinking it might be best to have a script that, at the start of each loop, goes through and manually sets all the variables that I want to be reset at the start of loops to their starting values.
I was wondering if you thought that was a decent implementation, or if there's an easier/better way to flag a whole set of variables to be reset.
Thanks so much!