Many thanks for the input, here is what I am struggling with at the moment:
Let’s say the player gets to chapter 3 and thinks - OK, I’ll save here and explore these paths.
They then play on for a few chapters and die
I need to make sure they pick up from where they last saved. IE back to chapter 3 in this example
If I am not careful they will be able to restart at chapter 3 with inventory etc from chapter 4, 5, 6 etc
Here is an excellently helpful reply to my previous post. This would solve every problem Except a player wanting to save at chapter 1 , go through 2, 3, 4 and die and then start again at chapter 1
Also, that the app does not have a save system inbuilt?
It does, but not the kind you’d think. It saves current progress only.
Jonnysaxc:
where does it go? Into cache?
Into memory. The second set of variables does the saving.
Here’s a simplified example with only 3 vars total. In startup.txt, make an additional copy of all your *create variables and name them accordingly:
*comment standard vars
*create name ""
*create int 0
*create dex 0
*comment save vars
*create name_save ""
*create int_save 0
*create dex_save 0
Then in a gamesave.txt do the following:
*label save
*set name_save name
*set int_save int
*set dex_save dex
*return
*label load
*set name name_save
*set int int_save
*set dex dex_save
*return
Tune it to however many variables you have in total.
Then right at the beginning of a chapter 2 (for example) do this:
*gosub_scene gamesave save
That will save the game. At the end of chapter 2, if player wishes to restart it do this:
Onto the next chapter or start over?
*choice
#Restart
*gosub_scene gamesave load
*goto_scene chapter2
#Onto chapter 3
*goto_scene chapter3
Same with death sequences. Except you don’t go to the next chapter, but to an ending scene.