Skip to content

Instantly share code, notes, and snippets.

@Verdi
Created February 25, 2019 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Verdi/c04f379322fbcd789767e57f92af957f to your computer and use it in GitHub Desktop.
Save Verdi/c04f379322fbcd789767e57f92af957f to your computer and use it in GitHub Desktop.
Bandersnatch-like timer for Twine
[[DEFAULT CHOICE PASSAGE NAME]] <!-- This is the passage you will go to if no action is taken -->
[[PASSAGE NAME]]
<!-- Timer code below -->
{(live: XX+8s)[(replace: "PASSAGE NAME")[**~~PASSAGE NAME~~**]]}<!-- This will cross out a link to a passage. The time (live: XX+8s) is meant to make it happen 8 seconds after the 10 second countdown starts. -->
{(live: XXs)[(stop:) <!-- "XXs" is the amount of seconds you want to wait before the countdown starts -->
(set: $counter to 10)
Time left: |amount>[$counter]
(live: 1s)[
(set: $counter to it - 1)
(if: $counter is 0)[(go-to: "DEFAULT CHOICE PASSAGE NAME")]
(replace: ?amount)[$counter]
]]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment