This question gets asked pretty often, and I don’t think it has its own topic yet. So, here’s how you add checkpoints/save states to a WIP, so testers can have this function before COG adds their official version at publication.
- Make a scene. I called mine save_states. Find every variable that could possibly change over the course of the game, and make two lists of them. One will be used for saving, one for loading.
- Go to startup. *create a saved_variable for every variable (e.g. if a variable is strength, create saved_strength.) Keep all of these together so you can delete them when they’re no longer needed (when you’re stripping the temporary save states back out before COG adds the official system.)
- Under a label save_these_stats, paste a set command in front of each variable. Then add the matching saved_variable to each line. It will look like: *set saved_strength strength
- Under a label load_these_stats, do the same thing but in the reverse order. Like so: *set strength saved_strength
- You can use gosub_scene to save, so add a *return at the end of save_these_stats. The full command to get there would be: gosub_scene save_states save_these_stats
- Using a gosub rather than a goto for loading can mess up your options; any options that were greyed out after being chosen will still be unavailable, if you’re reloading within the same scene. So instead, set a variable called checkpoint. Name each checkpoint.
- Use goto load_these_stats to load, then depending on the name of the checkpoint, use a goto to send the player to the right scene and label.
Tada. It’s time-consuming to set up at first, and you have to remember to keep updating it as you add more variables. But it’s pretty easy once you get the hang of it.
WARNING: This method only works if the player doesn’t close their browser, turn off their computer, or clear their cookies. It’s still helpful to testers, but there’s no such thing as a reliable, truly permanent variable in a WIP.