Twine: how can I check if a passage has been visited?

+2 votes
174 views
asked Apr 7 in Authoring by peterorme (104 points)

In Twine 1.4, is there some built-in way of checking whether a given passage has been visited?

1 Answer

0 votes
answered Apr 7 by AndrewS (250 points)
selected Apr 8 by peterorme
 
Best answer

I made a small Twine with Start, Room 1, Room 2 and Room 3. Start pointed to Room 1 and Room 2, which pointed to each other.

Here is a sample code of Room 1:

You can visit [[Room 2]].

Room 1 is visited <<print visited("Room 1")>> times.
Room 3 is visited <<print visited("Room 3")>> times.

<<if visited("Room 3")>>How did you manage to visit room 3? Wow!<<else>>Room 3 is unvisited!<<endif>>
commented Apr 8 by peterorme (104 points)
Right. The twine documentation is a little hard to traverse if you're not sure what you're looking for, but this info is on the "function" page: http://twinery.org/wiki/function
This site is now closed.
As of 1st November 2015, this site is a read-only archive. For more information see the intfiction forum post

Welcome to IF Answers, a site for questions and answers about Interactive Fiction.

Technical questions about interactive fiction development tools such as Inform, Twine, Quest, QuestKit, Squiffy, Adrift, TADS etc. are all on-topic here.

Non-technical questions about interactive fiction are also on-topic. These questions could be about general IF design, specific games, entering the IF Comp etc.
...