Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sugarcane timer?

Could someone help me figure out how to have a timer in sugarcane? I need it to display on the screen, run for about 5 minutes while you navigate through a couple pages then when it runs out it brings you to a game over screen and I also need it to go away so you can progress like normal when you get to a certain point in the story. A section of the story needs to be completed within a certain time.
Something like the timer in Queers in love at the end of the world is the closest thing I have found.

Thank you! Any help is appreciated!


  • I got this to work can someone explain why the number gets stuck and if there is a way to fix it?
  • note: It is generally a good idea to only have a single script tagged passage in your story, especially if the Javascript defined in one passage uses the Javascript defined in another. The reason is because there is no way to control which script passage gets processed first which can result in errors.

    When you say "why the number gets stuck" do you mean, why does the count down stop decreasing on the 2 passage?
    If so then that is because that passage is missing the <<set $timer-=1>> line of code that does the actual decreasing of the variable.
    second page
    <<timedloop 1s>>
    <<print $timer>>
    <<set $timer-=1>>
    <<if $timer is 0>><<goto "gameOver">><<endif>>
  • Thanks for your help and advice!! I have everything sorted out now!
Sign In or Register to comment.