findEmptyPositionReady: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Check if [[findEmptyPosition]] command can be called without waiting for files. |DESCRIPTION=
| Preloads area to be used with [[findEmptyPosition]] command and returns [[true]] when area is ready. The size of the area preloaded is from <tt>center - radius - maxDistance</tt> to <tt>center + radius + maxDistance</tt><br><br>
{{Important | Preloading large areas may take a long time, we are talking minutes. However once preloaded, it stays preloaded even after mission restart}}  |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| center '''findEmptyPositionReady''' [minDistance, maxDistance] |SYNTAX=
| center '''findEmptyPositionReady''' [radius, maxDistance] |SYNTAX=


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


|p2= [minDistance, maxDistance]: [[Array]] -  |PARAMETER2=  
|p2= [radius, maxDistance]: [[Array]] -  |PARAMETER2=  


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


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




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


____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 09:52, 29 November 2019

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:
Uncategorised

Syntax

Syntax:
center findEmptyPositionReady [radius, maxDistance]
Parameters:
center:center: Array - Search area center position in format [x,y] or [x,y,z] in which case z is ignored. Accepts Position2D or Position3D
[radius, maxDistance]: Array -
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

Notes

Bottom Section