Background for Fallout 4
Member of the Utility script
intfunctionRandomInt(intaiMin=0, intaiMax=100)NativeGlobal

Description

Wiki Description

Generates a random integer between the minimum and maximum values (inclusive).

Documentation Comment

Generates a random integer between aiMin and aiMax (inclusive)


Caveats


Parameters

intaiMin=0

CK Wiki Description

The minimum value for the random integer.

intaiMax=100

CK Wiki Description

The maximum value for the random integer.


Examples

; Get a random number between 0 and 100
int random = Utility.RandomInt()
; Get a random number between 0 and 10
int random = Utility.RandomInt(0, 10)

Auto-Generated Example

int myInt__aiMin
int myInt__aiMax

int returnedValue = Utility.RandomInt(myInt__aiMin, myInt__aiMax)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.