Ar GetRandomKey

From GECK
Jump to: navigation, search


A function added by the SUP NVSE Plugin.

Description

Returns random valid numeric key of element from existing array.

Syntax

[help]
(iKey:int) Ar_GetRandomKey myArr:array

Example

array_var ar_myArr
int iKey
let ar_myArr :=Ar_List JohnREF, PaulREF, GeorgeREF, RingoREF, PlayerRef
set iKey to Ar_GetRandomKey ar_myArr 

Will set iKey to Random number(0,1,2,3,4).

See Also