BIS_fnc_randomPos

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Take On Helicopters version 1.00
Introduced with Arma 3 version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Take On Helicopters
Version:
1.00

Description

Description:
Selects random position according to given params within given area

Syntax

Syntax:
[whitelist, blacklist, code] call BIS_fnc_randomPos
Parameters:
[whitelist, blacklist, code]: Array
whitelist (Optional): Array - whitelisted areas. If not given, whole map is used. Areas could be:
blacklist (Optional): Array - blacklisted areas. If not given, water is blacklisted. Areas could be:
  • Object - trigger
  • String - marker name or special tags names: "water" - exclude water, "ground" - exclude land
  • Array - in format [center, radius] or [center, [a, b, angle, rect]]
  • Location - location.
code (Optional): Code - custom condition which should return true for current position candidate passed in _this variable to be accepted. If not specified all candidates are accepted
Return Value:
Array - position candidate in format [x,y,z] or [0,0] if position cannot be found

Examples

Example 1:
_randomPosMapNoWater = [] call BIS_fnc_randomPos;
Example 2:
_randomPosMapNoWater = [nil, ["water"]] call BIS_fnc_randomPos;
Example 3:
_randomPosMapNoLand = [nil, ["ground"]] call BIS_fnc_randomPos;
Example 4:
_randomPosMap = [nil, []] call BIS_fnc_randomPos;
Example 5:
_randomPosAroundPlayer = [[[position player, 50]],[]] call BIS_fnc_randomPos;

Additional Information

Execution:
call
Multiplayer:
-
See also:
BIS_fnc_randomPosTriggerBIS_fnc_getAreaBIS_fnc_findSafePos

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section