inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.04k stars 485 forks source link

Saving JSON story state right after choices and opening the story back continues from the pre-choice line #479

Open KumoKairo opened 5 years ago

KumoKairo commented 5 years ago

We have faced an interesting issue. If we display a line of text before a set of choices and save immediately after choosing something, it starts with that pre-question line when loading. It looks like:

What do you want to eat?
    * Fish
    You eat fish. It's tasty
    * Meat
    You eat meat. It's meaty
    * Vegetables
    You eat vegetables. It's healthy

If we answer "fish", save and quit, Ink will display this at the next startup:

What do you want to eat?
You eat fish. It's tasty

It will display the question without choices, it will just continue to the next line down the path of the choice which was made before saving Is it intentional by design? Right now we ad-hocked a nasty solution where we force-continue the story if we have saved right after the choice so it skips the first line (pre-question) and goes down the choice line immediately

technoplato commented 5 years ago

@kumokairo sorry this isn't directly related, but can you point me towards the documentation for saving?