Difference between revisions of "Rand"
Jump to navigation
Jump to search
imported>Odessa (note) |
imported>Odessa m (clarified) |
||
Line 15: | Line 15: | ||
int iRand | int iRand | ||
set iRand to Rand 0, 100 ; * equivalent to using GetRandomPercent | set iRand to Rand 0, 100 ; * for 0-99, equivalent to using GetRandomPercent | ||
}} | }} | ||
==Notes== | ==Notes== |
Latest revision as of 06:50, 6 August 2014
< [[::Category:Functions|Category:Functions]]
A function added by the New Vegas Script Extender.
Description
Returns a random float between specified minimum and maximum. Added by NVSE V1.6.
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.