"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.

Live Example

Download: Live Example

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);

Download: Twee Code

results matching ""

    No results matching ""