Hello,
Apologies if this is posted elsewhere, but I keep seeing countdown timers for Sugarcube, and not Harlowe. I'm looking for a simple countdown timer that will display live (starting at 30s), and at 0s automatically forward to a different passage. The timer does not need to be global, as it's limited to one specific passage/stage of the game.
Any help is greatly appreciated! (also, I'm using Twine 2.0.1, Harlowe format)
Comments
Try the following:
But generally it is a good practice to have all your CSS in one place, that being the Story Stylesheet area and with a little knowledge of the HTML that Harlowe generates you can design a CSS selector which will target the amount named hook.
note: You can use your web-browser's built-in Development Tools (or the Inspect Element context menu if it has one) to see the HTML that Harlowe generates.
A named hook is transformed into a tw-hook element with a name attribute equal to the hook's name, so the CSS you would need to style the example from my previous comment would look like:
Try viewing the following: Your choices are:
a. Harlowe's Collapsing whitespace markup
b. Be careful where you place your line-breaks.
c. both A and B
In the case below:
(set: $counter to 10)
You have |amount>[$counter] seconds left!
(live: 1s)[
(set: $counter to it - 1)
(if: $counter is 0)[(go-to: "Next Passage")]
(replace: ?amount)[$counter]
]
I can only take the gamer to one passage
One solution is to use the (either: ) macro to randomly select a passage name from a list of target passage names: note: I have added indents and extra line-breaks to make the above example easier to read, they can be safely removed.