Ar GetRandomKeyMap

From GECK
Jump to: navigation, search


A function added by the SUP NVSE Plugin.

Description

Returns random valid Map key of element from existing array.

Syntax

[help]
(sKey:string) Ar_GetRandomKeyMap myArr:array

Example

array_var ar_myArr
string_var sKey
let ar_myArr :=Ar_Map "LALALA"::PlayerRef, "TROLOLO"::SunnyRef, "HAHAHAH"::JohnRef
let sKey := Ar_GetRandomKeyMap ar_myArr 

Will set sKey to any of these map keys("LALALA","TROLOLO","HAHAHAH").

Notes

  • If key map is a numeric value - will return string, converted from numeric value.

See Also