Question on Countdown Timer from Twin 2 / SugarCube 2 Sample Code by HiEv is not working 100%

I am totally new(learning this about 2 weeks thus far) in Twine 2 and sugarcube 2 ecosystem. I copied the Countdown Timer from Twine 2 / SugarCube 2 Sample Code(link - by HiEv. The code works 99% of the time but this Countdown Timer failed most of time when I start my story using the FireFox Browser very first time; thereafter, it works well. However, I have not test this issue very extensively but I definitely think it does not work 100% of the time in FF. I will test it in other browsers in the future.
Here is the scenario of my timer -
I will start the Countown Timer (code: <<countdownTimer 130 “Timeout ListWords1”>>).and when it expired, it will got to my passage titled Timeout ListtWord1. When it failed, it will skip the timer and will go to the Timeout ListWords1 passage directly.
Here is my environment:
Windows 10 Version 1909 build 18363.720 on my laptop
Firefox Browser 74.0 (64-bit)
SugarCube 2.30.0
Please let me know if you guys have any questions.
I hope I am in the right place to ask this type of question. :slight_smile: :).
Thank you.

I tried the sample and it works 100% on my FF (version 76). So either

  1. You modify the code and something go wrong.
  2. Your firefox has some interesting addon that made javascript go wrong. I remember talking with a man who insisted on having issues with a twine game and turned out everything was okay as soon as he shutdown one of his addons.
  3. Try to upgrade SugarCube to 2.31.1… though I check the code and the timing bit is nothing but standard javascript.
1 Like