0 votes
by (130 points)

Hello, I have two twins passages.

Users can click Option A or Option B

If they choose Option A I want them to read and then be linked to option B,

and then if they choose Option B I want them to read the passage then be force to go to Option A so basically they have to go through both passages to get to the next. 


So in easier terms:

A stranger hands you a potion and a box.

[[Drink the potion]]

[[Open the box]]


If users clicks Drink the potion they restore hp but then they need to open the box.

and if the user opens the box they need to drink the potion next. I already have those two linked together,

but how do I make it so that once they do both they can then pass to the next passage?  


Hopefully this makes sense? 

1 Answer

+1 vote
by (159k points)

Please use a Question Tag to indicate the name and full version number of the Story Format you are using, as answers can vary based on this information. I will assume you are using Harlowe v3.0.2 as that is the default story format of the more recent versions of the Twine 2.x application.

You can use a combination of the (if:) macro and the (history:) macro to determine if the end-user has visited a specific passage yet, and use that infromation to conditionally display the link to the 'next' passage.

eg. within your Drink the potion passage..

(if: (history:) contains "Open the box")[ [[Next Passage]]]\
(else:)[ [[Open the box]]]

.. and within your Open the box passage..

(if: (history:) contains "Drink the potion")[ [[Next Passage]]]\
(else:)[ [[Drink the potion]]]


by (130 points)
Thanks for the input! I'll be sure to make note of that! and ty for the answer as well!

I haven't quite gotten that advanced I just started learning twin today so I've really only learned the very very basic commands and haven't gotten into coding or Harlowe
by (159k points)
If you found that my answer solved your issue then it helps if you mark it so, there should be a button associated with the above Answer that lets you do that.

(I'm unsure about the exact button's name because I've never asked a question myself so, I haven't seen what buttons are available you a Question Asker within Answer related posts.)