BIS fnc randomPosTrigger: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "<code>(\[?[^\[]+\]?) *(\[\[)?(call|spawn)(\]\])? *(\[\[)?(BI(N|S)_fnc_[a-zA-Z0-9_]+)(\]\])?;?<\/code>" to "<sqf>$1 $3 $6;</sqf>")
(Function doesn't return random pos in 3D area)
 
Line 18: Line 18:
* [[Location]] - location
* [[Location]] - location
* [[Array]] - array in format [center, distance] or [center, [a, b, angle, rect]] or [center, [a, b, angle, rect, height]]
* [[Array]] - array in format [center, distance] or [center, [a, b, angle, rect]] or [center, [a, b, angle, rect, height]]
{{Feature|informative|Be aware that the {{hl|height}} value is ignored.}}


|r1= [[Array]] - random position in format [x,y,z]
|r1= [[Array]] - random position in format [x,y,z]

Latest revision as of 17:32, 24 September 2025

Hover & click on the images for description

Description

Description:
Selects random position within trigger, marker, location area or area defined by array
Execution:
call
Groups:
Map and Markers

Syntax

Syntax:
param call BIS_fnc_randomPosTrigger
Parameters:
param: can be one of:
  • Object - trigger
  • String - marker
  • Location - location
  • Array - array in format [center, distance] or [center, [a, b, angle, rect]] or [center, [a, b, angle, rect, height]]
Be aware that the height value is ignored.
Return Value:
Array - random position in format [x,y,z]

Examples

Example 1:
marker1 call BIS_fnc_randomPosTrigger;

Additional Information

See also:
BIS_fnc_findSafePos

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note