{"name":"BIS_fnc_selectRandom","title":"BIS fnc selectRandom","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_selectRandom","revid":348921,"updated":"2023-11-08T14:44:05Z","groups":["Arrays"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Selects one of the arguments at random.\n\n> [!NOTE]\n> **Arma 3:** Use selectRandom instead.","syntaxes":[{"syntax":"values call BIS_fnc_selectRandom","params":[{"name":"values","type":"Array","description":"array of values of which one will be selected at random","type_expr":"Array"}],"returns":{"type":"Anything","type_expr":"Anything","description":"one of the values you passed, chosen at random"}}],"examples":[{"code":["private _bestShooter = [_rento, _ben, _trit] call BIS_fnc_selectRandom; // returns one of the variables\n_bestSeries = [[\"halo1\",\"halo2\"],[\"ofp\",\"arma2\"]] call BIS_fnc_selectRandom; // returns one of the arrays"]}],"see_also":["selectRandom"]}