That is a link back to the Start passage, not a true Restart. If I used visited(), the visit counter will remain the same. From my testing Restarting will wipe out everything except <<remember>>ed variables, and that is what I want to do.
The problem with using [[Restart|Start]] is that it will not null your variables. In order to do that, the easiest way is probably to just copy the restart code from code.js in your Twine/targets/Sugarcane folder and remove the popup window.
if(confirm("Are you sure you want to restart this story?"))
Then call the code with a script. There might be an easier way, but Im new to Twine myself.
EDIT: I looked around for a couple minutes on the web and found that variables are stored here:
state.history[i].variables
So it should be easy enough to do a for loop and null them all. I'm testing it out and I'll let you know if I get something that works.
A little clunky he says. Does it in one line without a macro. Even if it is basically an F5, I should have thought of that. This is why my code is going to be ugly as hell by the time I'm finished. xD
Comments
[[Restart|Start]]
EDIT: I looked around for a couple minutes on the web and found that variables are stored here: So it should be easy enough to do a for loop and null them all. I'm testing it out and I'll let you know if I get something that works.
Created a macro. Call it with <<wipeout>> before you restart. Obviously this is assuming you have less than 99 variables.
Cheers.