Preserving the state of revealed text in a passage (Harlow)

Please specify version and format if asking for help, or apply optional tags above:
Twine Version: 2
Story Format: 3.1

Apologies if this is a really obvious question…
I have passage call it passage A which uses a sequence of (click:) macros to display hooks with extra text. The final hook in the sequence contains a link to passage B.
When the player clicks the link in passage B to get back to passage A, it reloads the whole passage with none of the extra text still showing.
Is there any straightforward way to get back from passage B to passage A, but with all the extra texts still showing?

As a high-level solution, could you create a flag/variable that only reveals the relevant text in passage A when it is set, and set it to true the first time the player clicks the macro and sees the text from the click macro? When they return to passage A, the flag is true and will display the same text that the player clicked on by default.

Along with this, you could vary the text not to show the click macro in passage A when the reveal flag is true so the player won’t click again and see duplicate text.

I’m afraid that’s just how it works. I don’t think any of the story formats remember state within the passage for you. But it’s not too hard to track: it’s just a little tedious. I think this does what you’re looking for.

|base>[The base passage text.]
|text1)[The first add-on.]
|text2)[(set: $passageA to true)The second add-on. [[Passage B]].]
	(if: $passageA is true)[
		(show: ?text1)
		(show: ?text2)
		(click: ?base)[(show: ?text1)]
		(click: ?text1)[(show: ?text2)]
1 Like

Thanks that works a treat :smiley:
I’d not really got to grips before with hidden hooks, but I can see they are very useful for exactly this sort of text structure; which is great since my story makes heavy use of it.

1 Like