Is there a way to protect a LIST from being reset when using the 'restart' button? #777
-
Hello again! I've tried creating my own 'restart' button at the end of my file and rewriting all the variables before the button is pressed, but I can't reset knots seen, which a lot of my choices are based on. Unless, there is a way to do that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The way I'm always doing it, it's treating the part I want to keep as an exception to the reset. I particularly like the LIST keyword for that (and I'll call it When doing the "reset" loop action, I'll first copy the current value of the Knowledge list value. Reinit ink state to the beginning, and erasing the Knowledge list var to the value I stocked just before. And keep going. So instead of just using the For example, in js, this is the code I use in the part where the if( tag == "RESTART" ) {
var knowKeep = story.variablesState.$("knowKeep");
restart();
story.variablesState.$("knowKeep", knowKeep);
return;
} I hope this can help you. |
Beta Was this translation helpful? Give feedback.
The way I'm always doing it, it's treating the part I want to keep as an exception to the reset.
I particularly like the LIST keyword for that (and I'll call it
Knowledge
or some other relevant name)Each time the user is passing through something I want to keep between reset, I'll change the Knowledge list value.
When doing the "reset" loop action, I'll first copy the current value of the Knowledge list value. Reinit ink state to the beginning, and erasing the Knowledge list var to the value I stocked just before. And keep going.
So instead of just using the
*
and+
to keep track if that's the first time, I will also do {Knowledge?DragonsBreath} to know if the player already went there a…