Hi everyone! I'm very new to Twine and coding in general, so please bear with me. I'm trying to create an invisible timer that will count down across multiple passages, and then redirect the player to a new, designated passage when time is up. I'm currently using User L's timedgoto macro (adapted for SugarCube by Lectronice), which I have attached as a .txt, but the problem is that the timer stops if the player clicks out of the passage it was referenced in.
Anyone know how I can make this timer work across multiple passages? Again, I barely know any code, so please explain as if you were teaching it to a child :P Any help would be unfathomably appreciated!
P.S. if anyone has already done something exactly like this and doesn't mind sharing sample code, that would be tops!<img src="
https://twinery.org/forum/uploads/Uploader/fd/ffb1a568510de0bece39169e639b20.txt" /><img src="
https://twinery.org/forum/uploads/Uploader/fd/ffb1a568510de0bece39169e639b20.txt" />
Comments
If you don't want the countdown to start when the story itself starts then you will need to execute the related Javascript using a <<script>> macro within the passage you want the countdown to start in.
Anyway, if that is the case your answer is here: http://twinery.org/forum/discussion/8001/visual-countdown-timer-sugarcube2-11-0 (the relevant instructions start with my post on December 2nd)
This countdown is auto-triggered in the passage of your choosing, runs seamlessly across multiple passage, displays in the side bar (and can be styled with CSS) and then kills (or in your case sends them to a passage of your choosing) when the timer runs out.
There also an allowance for beating the time by reaching a 'win' passage before it runs out.
NB: This method applies to SG2 so I'm not sure how much (if any) adapting would be required.