Arma 3 Scripting

BIS_fnc_randomPos

  • Arma 3 v0.50
  • First in Take On Helicopters v1.00

Function · Markdown · JSON · original wiki page

Description

Selects random position according to given params within given area

Syntax

[whitelist, blacklist, code] call BIS_fnc_randomPos

Parameters:

Returns: Array - position candidate in format [x,y,z] or [0,0] if position cannot be found

Examples

Example 1

private _randomPosMapNoWater = [] call BIS_fnc_randomPos;

Example 2

private _randomPosMapNoWater = [nil, ["water"]] call BIS_fnc_randomPos;

Example 3

private _randomPosMapNoLand = [nil, ["ground"]] call BIS_fnc_randomPos;

Example 4

private _randomPosMap = [nil, []] call BIS_fnc_randomPos;

Example 5

private _randomPosAroundPlayer = [[[position player, 50]], []] call BIS_fnc_randomPos;

See also

BIS_fnc_randomPosTrigger · BIS_fnc_getArea · BIS_fnc_findSafePos

Community notes