Difference between revisions of "Random"
From Wiki
(→Example) |
(→Example) |
||
Line 5: | Line 5: | ||
<pre> | <pre> | ||
− | ; make a random number between 0 and 99. | + | ;make a random number between 0 and 99. |
set %a #random % 100 | set %a #random % 100 | ||
Line 11: | Line 11: | ||
;make a random number between two set numbers | ;make a random number between two set numbers | ||
set %random1 #random % %increments + %base | set %random1 #random % %increments + %base | ||
− | ;%increments is the number of different numbers to choose from | + | ;%increments is the number of different numbers to choose from. |
− | ;%base is the | + | ;%base is the number closer to 0 from your list of numbers. |
− | ;Example of two random numbers between | + | ;Example of two random numbers between 4 and 10 ;set %random1 #random % 7 + 4 |
</pre> | </pre> | ||
{{footer}} | {{footer}} |
Revision as of 13:27, 7 January 2007
⇒ | Holds a changing random value that ranges between 0 and 999. |
Example
;make a random number between 0 and 99. set %a #random % 100 ;make a random number between two set numbers set %random1 #random % %increments + %base ;%increments is the number of different numbers to choose from. ;%base is the number closer to 0 from your list of numbers. ;Example of two random numbers between 4 and 10 ;set %random1 #random % 7 + 4
See also
Main Page | Documentation |