Rand
From GECK
A function added by the New Vegas Script Extender.
Contents
Description
Returns a random float between specified minimum and maximum.
Syntax
(float) Rand Minimum:float Maximum:float
Example
float fCount set fCount to Rand 1, 10
int iRand set iRand to Rand 0, 100 ; * for 0-99, equivalent to using GetRandomPercent
Notes
- To get an int, either use Floor or just store the return in an int variable.
- To round to the nearest int, add 0.5 to the return and then either Floor it or store it in an int variable.