Open new area when entire area has been examined in Twine

Hey, I’m probably asking too many questions but i’m wondering how to make a new passage open up once all the passages have been inspected. I looked through the cook book but couldn;t find anything about this.

Thanks in advance,

I’m not really a Twine guy, but the easy way would simply be to set a variable to true inside each passage (a separate variable for each passage), and then have some conditional logic that only displays the “finishing” passage link when all the variables are true.

You could also use something like this to hide passages that have already been visited from the common menu display.

There might be a more elegant way to do it, though :slight_smile: (Perhaps something like this…)

How to do things like that depends on what story format you’re using.

I’m marking your post as Harlowe 3, so that people who know that format can help.

Don’t forget to mention your story format in future posts.

Thanks. :smiley:

Similar to Gavin’s answer but perhaps not so complicated to unlock:

  • Set a variable for each area that begins at 0.
  • When the area is visited, set it to exactly 1 (you can do this in the passage as they visit it - if it sets to exactly 1 then it doesn’t matter how many times they visit).
  • Then, set an “unlock” variable that adds the other variables together (so unlock=room1+room2+room3).
  • The final task is to write an “if” macro that unlocks when the unlock variable score equals however many rooms they need to visit.

I’ve done this for one of my games and it worked beautifully. I hope this helps. :slight_smile:

I’d do something like adding this line to every passage you need seen before continuing (this is untested):

(unless: (history:) contains (passage:)'s name)[(set: $seen += 1)]

And then when you’re checking whether you can continue on, just do (assuming there are 5 passages to see first):

(if: $seen is 5)[
	[[next passage]]

My harlowe-fu isn’t very strong, so hopefully all of that syntax is correct, but logic-wise it should do what you want.