Howdy, Stranger!

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

Time limit on choices in game (telltale-style?) [SugarCube 2]

I have multiple buttons corresponding to multiple choices the player can make. How do I add a time limit after which one of these choices is automatically selected?

Also preferably display the timer if possible...

Comments

  • I did something somewhat similar (I started in Harlowe but moved to Sugarcube to accomplish it). See TheMadExile's code: twinery.org/forum/discussion/5575/sidebar-that-follows-scrolls-down#latest
  • Hi!

    With SugarCube you could do something like this:
    [[choice 1]]
    
    [[choice 2]]
    
    [[choice 3]]
    
    <<timed 5s>><<goto "choice 1">><</timed>>
    

    And after 5 seconds, if the reader hasn't clicked on any of the three options, it will select the first one.

    You could also add a <<continuelink>> so that the timer is triggered by the reader at the same time your present her the options:
    <<continuelink "Next">>[[choice 1]]
    
    [[choice 2]]
    
    [[choice 3]]
    
    <<timed 5s>><<goto "choice 1">><</timed>>
    

    <<timedcontinue>> should also work:
    <<timedcontinue 5s>><<goto "choice 1">>
    

    And for your timer, how about a <<timedinsert>> before displaying the choices?
    <<timedinsert 1s>>1<<becomes>>2<<becomes>>3<<becomes>>4<<becomes>>5<</timedinsert>>
    
    [[choice 1]]
    
    [[choice 2]]
    
    [[choice 3]]
    
    <<timedcontinue 5s>><<goto "choice 1">>
    

    There's must be a better way of doing what you want, but the above should work!
Sign In or Register to comment.