Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

harlowe - keeping variables through savegames?

$
0
0
yo
so i've got a save/load game function in my game at the moment (works if you close the tab, lets you visit the main menu, etc)

(this is a footer on every page:)
[Save Game]<save| || [Load Saved Game]<restore|
(click: ?save)[*Saved!*(savegame: "A")] (click: ?restore)[*If you're seeing this, the game failed to load.*(loadgame: "A")]

but!
i also have some settings id like the players to be able to customise (e.g 'show lock-in options' shows the final chances to see options)
You (if: $showlockin is "yes")[have](else:)[do not have] lock-in options enabled.
[Show Lock-In Options]<showlockin|
(click: ?showlockin)[You will now see lock-in options with LO tags.
(set: $showlockin to "yes")][Hide Lock-In Options]<hidelockin|
(click: ?hidelockin)[You will no longer see lock-in options.
(set: $showlockin to "no")]

the only problem is...
if a player saves the game, then goes to the menu, and changes the options... restoring their save game will reset the options to whatever they were when the save was made. making a new save keeps the options, but stops them returning to their previous point (deleting the old save forever; they have to restart).
is there any way to make certain variables carry over between saves?

TL;DR can't keep flags through savegames, how fix

Viewing all articles
Browse latest Browse all 1844

Trending Articles