Difference between revisions of "GetRandomPercent"
Jump to navigation
Jump to search
imported>Scallywag38 |
imported>Scallywag38 |
||
Line 13: | Line 13: | ||
==Notes== | ==Notes== | ||
*To generate a random number between min and | *To generate a random number between min and max: | ||
<pre>set randVal to min + GetRandomPercent * (max-min) / 99</pre> | <pre>set randVal to min + GetRandomPercent * (max-min) / 99</pre> |
Revision as of 13:46, 30 November 2010
< [[::Category:Functions|Category:Functions]]
Link to TES4 Construction Set Wiki: GetRandomPercent.
A function included in the GECK version 1.1.0.36.
Description
Returns a random integer between 0 and 99 inclusive.
Syntax
(0 to 99:int) GetRandomPercent
Example
short rnd set rnd to GetRandomPercent
This will set the variable "rnd" to an integer between 0 and 99, inclusive
Notes
- To generate a random number between min and max:
set randVal to min + GetRandomPercent * (max-min) / 99