findEmptyPositionReady: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
m (Some wiki formatting)
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
|gr1= Positions
|gr1= Positions


|descr= Preloads area to be used with [[findEmptyPosition]] command and returns [[true]] when area is ready. The size of the area preloaded is from {{hl|center - radius - maxDistance}} to {{hl|center + radius + maxDistance}}{{Feature | important | Preloading large areas may take a long time, we are talking minutes. However once preloaded, it stays preloaded even after mission restart}}
|descr= Preloads area to be used with [[findEmptyPosition]] command and returns [[true]] when area is ready.
The size of the area preloaded is from {{hl|center - radius - maxDistance}} to {{hl|center + radius + maxDistance}}
{{Feature|important|Preloading large areas may take a long time, we are talking minutes. However once preloaded, it stays preloaded even after mission restart.}}


|s1= center [[findEmptyPositionReady]] [radius, maxDistance]
|s1= center [[findEmptyPositionReady]] [radius, maxDistance]


|p1= center: [[Array]] - Search area center position in format [x,y] or [x,y,z] in which case z is ignored. Accepts [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]]
|p1= center: [[Array]] format [[Position#Introduction|Position2D]] or [[Position#Introduction|Position3D]] - search area center position in format [x,y] or [x,y,z] in which case z is ignored


|p2= [radius, maxDistance]: [[Array]] -
|p2= radius: [[Number]] - distance from the center


|p3= radius: [[Number]] - distance from the center
|p3= maxDistance: [[Number]] - distance from the end of radius
|p4= maxDistance: [[Number]] - distance from the end of radius


|r1= [[Boolean]] - [[true]] when ready
|r1= [[Boolean]] - [[true]] when ready


|x1= Preload aread within 500m:
|x1= Preload aread within 500m:
<code>_ready = _center findEmptyPositionReady [0, 500];</code>
<sqf>_ready = _center findEmptyPositionReady [0, 500];</sqf>


|seealso= [[findEmptyPosition]]
|seealso= [[findEmptyPosition]]
}}
}}

Latest revision as of 17:02, 15 August 2022

Hover & click on the images for description

Description

Description:
Preloads area to be used with findEmptyPosition command and returns true when area is ready. The size of the area preloaded is from center - radius - maxDistance to center + radius + maxDistance
Preloading large areas may take a long time, we are talking minutes. However once preloaded, it stays preloaded even after mission restart.
Groups:
Positions

Syntax

Syntax:
center findEmptyPositionReady [radius, maxDistance]
Parameters:
center: Array format Position2D or Position3D - search area center position in format [x,y] or [x,y,z] in which case z is ignored
radius: Number - distance from the center
maxDistance: Number - distance from the end of radius
Return Value:
Boolean - true when ready

Examples

Example 1:
Preload aread within 500m:
_ready = _center findEmptyPositionReady [0, 500];

Additional Information

See also:
findEmptyPosition

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