Save states and disable_reuse


I have a simple script to add save states to my game for the sake of testing. There is a saved_variable for each variable; it sets each saved_variable equal to variable when saving, then when loading, returns to the checkpoint and sets variables back to saved_variables.

It works, except for one thing: disable_reuse on options. I have disable_reuse globally set on each scene I write, because there are only a couple of options that should be reusable in the whole game (which I use allow_reuse to set.)

However, what this means is that when loading a save state, every variable selected in a former playthrough becomes unselectable. Is there any way to clear the memory of which variables have been used when returning to a checkpoint? Do I really need to code everything around *disable_reuse on every single line that shouldn’t be selectable if you return to that label during the scene?

If I do swap everything to *disable_reuse as needed line-by-line, then things that should be disabled (e.g., you can’t go to the same place twice during study hall) are still unselectable after loading. I guess I could add a tag for “if (checkpoint_used)” and set two versions of each of those options, but man, that’s messy…


From what I can tell after testing several codes myself is that if you go to a new scene it resets all your disable reuse. So if you have your checkpoint for a brief moment go to a different scene altogether before returning all options should be usable again.

Edit: I’m using an older version of choicescript I’m going to try updating and see if this method still works.

Edit2: It does.


Thank you!! I have the save states accessed by a gosub_scene, so I’ll stick in a couple of goto_scene commands when loading.