Skip to content

"Passage Visits": SugarCube (v2.2)#


In SugarCube, the global function visited() returns the number of times a passage has been visited during the course of the story. Combined with the <<= >> macro expression, the result of a global function can be written to a passage.



Twee Code#

:: StoryTitle
SugarCube: Passage Visits

:: Start
How many times has the passage "Another Passage" been visited? <<= visited("Another Passage")>>

[[Another Passage]]

:: Another Passage

Twee Download