Skip to content

"Timed Passages": Chapbook (v1.0.0)#


Made famous in Queers in Love at the End of the World (2013), "Timed Passages" uses the JavaScript function setTimeout() and Chapbook's internal go() function to reload a passage every second. It combines the use of the Vars Section with multiple modifiers.



Twee Code#

:: StoryTitle
Chapbook: Timed Passages

:: Start
timeLeft: 11

:: World End
The world ended.

:: Timer
timeLeft: timeLeft - 1
[if timeLeft > 0]
  There are {timeLeft} seconds left.
  {embed passage: 'World End'}
  window.setTimeout(() => go('Timer'), 1000);

Twee Download