0 votes
asked by (130 points)
I'm very new to Twine and coding in general so bare with me.  I have 6 links in 1 passage for my player to choose from and read.  After reading though all 6 passages, I want an additional link to pop up on the original passage.  So they have to read through the whole thing, before getting the link to the ending passage.  How do I do that?

P.S. Sorry if that's overexplaining it.

2 Answers

+2 votes
answered by (18.6k points)

There are a couple of ways to do that.  However, if you want to avoid tracking variables, you could use the hasVisited() function.  The code would be as simple as:

<<if hasVisited("Passage 1", "Passage 2", "Passage 3", "Passage 4", "Passage 5", "Passage 6")>>
	[[Final passage|Passage 7]]
<</if>>

Now that final link to "Passage 7" will only appear if the player has already visited "Passage 1" through "Passage 6" (feel free to substitute your own passage names above).

Hope that helps!  :-)

commented by (130 points)
Yes it does! Thank you so much!
0 votes
answered by (15.1k points)
Are these links to actual passages or <<linkreplace>> macros?
commented by (130 points)
They're links to actual passages.
commented by (15.1k points)
In that case @HiEv's answer should be the most efficient way..
commented by (130 points)
Excellent, thank you!
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...