From what I see in your code (episode01), when the player dies, you send them to *label episodeone which is where you save the stats they currently have. You need to send them to a place that restores their saved values.
*randomzombiescene1 (the point before a random zombie scene happens)
*set checkpoint randomzombiescene1
*set sname name
*set sweapon weapon
scene code here -
If at any time you die, *goto load
*load
*set name sname
*set weapon sweapon
*goto {checkpoint}
Not tested it but I’m convinced that will work in theory, just remember to have lots of *set checkpoints/weapons/names (that match the label name of the scene you’re saving progress at).
I’ve put a save label at the end of each episode and a load label at the start of an episode which is skipped if you get to the episode from the previous one.
Going to test it out on my pc before reuploading it.
edit: tried it and it sort of works but the stats didn’t change to what they should have been
When you reach a death scene you have a choice to restart the episode which sends you to load.
the code looks like this
*goto episodeone
*label load
*set name sname
…etc
*goto episodeone
*label episodeone
start the episode
So if the player gets to the episode from the pilot it goes straight to the start and skips the load bit but if the player dies they can go back to load and begin the episode again with the stats they started with (or at least that’s what I want)
In the above code, NextScene is the name of the next consecutive scene.
If a player dies, I use:
*label RestoreScene
*set save_flag “restore”
*set return_to_scene “SameScene”
*page_break
*goto_scene savegame
Where SameScene is the name of the current scene.
In scene savegame, I let the player choose restarting the scene or starting over:
`
*if save_flag = “restore”
*page_break
You have died.
Luckily, your progress has been saved, and you may continue from the last checkpoint.
Do you want to continue from the last saved checkpoint, or start the game over?
*choice #Continue from last saved checkpoint
GAME RESTORED!
*page_break
*if return_to_scene = “ThirdFloor”
*goto_scene ThirdFloor
–repeat– #Start the game over
*ending
Tried using your system but it still doesn’t work right, it lets the player go back to the start of an episode but it defaults the stats?
so if my stats are 45 and 45 at the start of an episode and by the time I die they are 60 and 50. When I restart the episode instead of giving me 45 and 45 it gives me 10 and 10?
*label dead
*set save_flag “restore”
*set return_to_scene “episode01”
`
Two problems here:
*set save_flag “save” – you have a capital S on *set, so it’s not setting properly. You’ll need to fix this in each episode file.
*set return_to_scene “episode01” – this should be episode02 in this case (episode02.txt), to return to the start of the actual episode during which the player died. You need to amend both return_to_scene settings accordingly each time you copy/paste this bit into a new episode.
Didn’t spot anything in the actual savegame file itself so it should all work fine after these fixes.