User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

twine1:random [2017/10/09 20:39] (current)
Line 1: Line 1:
 +====random(value,​ value)====
 +When given two positive numbers, this produces a positive whole number randomly selected between the two, inclusive. This function can (and should only) be used to generate random numbers within a wide range - such as 1 to 100. Prior to version 1.4.2, you had to use the cumbersome ''​Math.random(value)*value''​ idiom to do this, which wasn't that memorable or succinct.
 +You have a <<​print random(1,​99)>>​ percent chance of complete and utter defeat!
twine1/random.txt ยท Last modified: 2017/10/09 20:39 (external edit)