Howdy, Stranger!

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

How to make simple dice game?

edited June 2015 in Help! with 1.x
Hail everyone!
Like in title. In my current story I have two characters that maked dice bet betwen each other. How I can make twine count their dice rolls and then choose the winner? Like this:
Player A [12,8,5,2,11,10] (two dices result, random numbers betwen 2-12)
Player B [11,11,12,10,9,7]

Player B win the bet - passage B appears instead of A because player A lost.

Also, how I can make different passages appear when dices results are betwen 12-30, 31-60, 61-70?
Thanks a lot for help!

Comments

  • edited June 2015
    It's different for each story format, but you should look up your relevant story's "either" function. For eample, here is SugarCube's, and this page also contains links to the general Twine documentation: http://www.motoslave.net/sugarcube/2/docs/story-functions.html

    In general, you want to combine the either, set, and if functions in this order:

    1. Set a $variable to either of the dice numbers
    2. If the $variable is a certain number, display different content
Sign In or Register to comment.