---
name: "BIS_fnc_selectRandom"
type: function
status: ok
groups: ["Arrays"]
arma3_since: "0.50"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_selectRandom
revid: 348921
updated: 2023-11-08T14:44:05Z
---

# BIS_fnc_selectRandom

*Function · Arrays · Arma 3 v0.50 · introduced in Arma 2 v1.00*

Locality: effect **local**

## Description

Selects one of the arguments at random.

> [!NOTE]
> **Arma 3:** Use [selectRandom](../commands/selectRandom.md) instead.

## Syntax

```sqf
values call BIS_fnc_selectRandom
```

**Parameters:**

- `values`: [Array](../topics/Array.md) - array of values of which one will be selected at random

**Returns:** [Anything](../topics/Anything.md) - one of the values you passed, chosen at random

## Examples

### Example 1

```sqf
private _bestShooter = [_rento, _ben, _trit] call BIS_fnc_selectRandom; // returns one of the variables
_bestSeries = [["halo1","halo2"],["ofp","arma2"]] call BIS_fnc_selectRandom; // returns one of the arrays
```

## See also

[selectRandom](../commands/selectRandom.md)

<sub>Source: [BI Community Wiki — BIS fnc selectRandom](https://community.bistudio.com/wiki/BIS_fnc_selectRandom) (revision 348921).</sub>
