Difference between revisions of "GetRandomPercent"
Jump to navigation
Jump to search
imported>Mrflippy (Random value between min and max) |
|||
Line 3: | Line 3: | ||
Returns a random number from 0-99 inclusive. | Returns a random number from 0-99 inclusive. | ||
To generate a random number between min and max: | |||
<pre>set randVal to min + (GetRandomPercent * (max - min)) / 99</pre> | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: Miscellaneous Functions]] | [[Category: Miscellaneous Functions]] | ||
[[Category: Condition Functions]] | [[Category: Condition Functions]] |
Revision as of 04:19, 14 April 2006
Syntax:
GetRandomPercent
Returns a random number from 0-99 inclusive.
To generate a random number between min and max:
set randVal to min + (GetRandomPercent * (max - min)) / 99