It looks like you're new here. If you want to get involved, click one of these buttons!
(set: $stories_completed to 0)
When the player completes a story, I want it to return to the start passage so they can start another story, but how do I avoid the variable being set back to zero as it is in the start passage?
Comments
With that assumption, my suggestion would be not to set the variable until a player completes a story.
So, on the last passage of any story, you could include: which would bump up the story count by one.
2. If I'm understanding you correctly, you're wanting to avoid a situation where someone just completes the same story over and over, and bumps up their total that way.
One suggestion might be to name each story, and then use an if macro to determine whether the story completed variable goes up. e.g.:
The following code will solve your problem if your story begins in a passage called Begin:
Then when a user completes a story: That will append the story name to the array, but only if the user hasn't completed the story.
To find out if a user has completed $story_in_question: To find out how many unique stories the user has completed: Disclaimer: Normally I test code snippets before posting them, but I didn't today. Syntax is correct to the best of my understanding.