It looks like you're new here. If you want to get involved, click one of these buttons!
macros.forgetall = macros.rememberall = {
handler: function (a, name) {
var s = state.history[0].variables;
for (variable in s) {
if (s.hasOwnProperty(variable)) {
if (name == "forgetall") {
delete window.localStorage[macros.remember.prefix + variable];
delete s[variable];
} else {
window.localStorage[macros.remember.prefix + variable] = s[variable];
}
}
}
}
}
Usage: <<rememberall>> or <<forgetall>>. That's it. It's kind of rough, but should work.
Comments
I am a beginner with Twine and was thinking about persistence a lot.
This saves my own properties perfect, but here's my stupid question: how to save internal information, like the visited-state and current passage? I simple wan't to pick up the story wherever the reader / player has left.
This is not possible in HTML.
By which I mean, it's "possible", but it's kind of pathetic and convoluted to actually make happen, so for the most part, it isn't.
edit: found fix