*title Savepoint Example - Replay Last Chapter Or Section *author Harris Powell-Smith *scene_list startup chapter_1 chapter_2 chapter_3 *comment Note that this template does not use implicit control flow. Using implicit control flow will also work. *comment Below are your normal game variables which you will *set during your chapters *create variable_1 false *create variable_2 false *create dog_petted false *create met_dog false *create butterfly_caught false *comment Below are your savegame variables. Don't *set these during your chapters - they're only used to store the state of the current variables *comment You must have one for each of the normal game variables *comment You don't have to use the save_ prefix but it's helpful to mark the savegame variables in some way for consistency and to avoid confusion. Using variable_1_save would be equally functional - it's just personal taste *create save_variable_1 false *create save_variable_2 false *create save_dog_petted false *create save_met_dog false *create save_butterfly_caught false *comment The below text is visible when this section is played Welcome to a template example of making a checkpoint system for your game. This version enables you to replay the chapter or section that has just been played. This template assumes that you have a solid understanding of ChoiceScript. - *link https://www.choiceofgames.com/make-your-own-games/choicescript-intro/ [b]Intro to ChoiceScript[/b] - *link https://www.choiceofgames.com/make-your-own-games/important-choicescript-commands-and-techniques/ [b]Important ChoiceScript Commands and Techniques[/b] - *link https://www.choiceofgames.com/make-your-own-games/choicescript-advanced/ [b]Advanced ChoiceScript[/b] In particular you will need to be comfortable using: - the *link https://choicescriptdev.fandom.com/wiki/Goto_scene [b]*goto_scene[/b] command. - the *link https://choicescriptdev.fandom.com/wiki/Gosub_scene [b]*gosub_scene[/b] command. Chapter 3 includes the *link https://choicescriptdev.fandom.com/wiki/Hide_reuse [b]*hide_reuse[/b] and *link https://choicescriptdev.fandom.com/wiki/Disable_reuse [b]*disable_reuse[/b] commands to demonstrate how checkpoints work with those commands. If you are interested in loading to earlier chapters than the one you just played, find that template *link https://dashingdon.com/play/hannahps/savepoint-example---multiple-load-points/mygame/ [b]here.[/b] If you're just here to look at the code, find it *link https://dashingdon.com/play/hannahps/savepoint-example/mygame/scenes [b]here.[/b]