Arma 3 Scripting

selectRandom

  • Arma 3 v1.56

Command · Markdown · JSON · original wiki page

Description

Returns a random element from the given array. Engine solution to BIS_fnc_selectRandom

Syntax

selectRandom array

Parameters:

Returns: Anything - random selected value or Nothing if array is empty

Examples

Example 1

_randomElement = selectRandom [1,2,3,4,5];

See also

selectRandomWeighted · random · select · selectMin · selectMax