Skip to content

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

Summary#

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.

Example#

Download

Twee Code#

:: StoryTitle
SugarCube: Passage Visits

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

[[Another Passage]]

:: Another Passage
[[Start]]

Twee Download