GetRandomInRange

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Similar to the vanilla function GetRandomPercent, except allows specifying a range.

Returns a random integer in the interval min <= x < max.

Syntax

[help]
(randNum:int) GetRandomInRange min:int max:int

Example

set iRandInt to GetRandomInRange -40 121

Returns a random integer between -40 and 120 (inclusive).

See Also