findEmptyPositionReady: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|gr1= Positions | |gr1= Positions | ||
| 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> | | 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}} | {{Important | Preloading large areas may take a long time, we are talking minutes. However once preloaded, it stays preloaded even after mission restart}} | ||
| center '''findEmptyPositionReady''' [radius, maxDistance] | | 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 [[Position2D]] or [[Position3D]] | |p1= center: [[Array]] - Search area center position in format [x,y] or [x,y,z] in which case z is ignored. Accepts [[Position2D]] or [[Position3D]] | ||
|p2= [radius, maxDistance]: [[Array]] - | |p2= [radius, maxDistance]: [[Array]] - | ||
|p3= radius: [[Number]] - distance from the center | |p3= radius: [[Number]] - distance from the center | ||
|p4= maxDistance: [[Number]] - distance from the end of radius | |p4= maxDistance: [[Number]] - distance from the end of radius | ||
| [[Boolean]] - [[true]] when ready | | [[Boolean]] - [[true]] when ready | ||
|x1= Preload aread within 500m: <code>_ready = _center [[findEmptyPositionReady]] [0, 500];</code> | |x1= Preload aread within 500m: <code>_ready = _center [[findEmptyPositionReady]] [0, 500];</code> | ||
| [[findEmptyPosition]] | | [[findEmptyPosition]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:33, 18 January 2021
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
- Groups:
- Positions
Syntax
- Syntax:
- center findEmptyPositionReady [radius, maxDistance]
- Parameters:
- 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