findEmptyPositionReady: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(syntax)
m (Some wiki formatting)
 
(47 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Check if [[findEmptyPosition]] command can be called without waiting for files. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| center '''findEmptyPositionReady''' [radius,maxDistance] |= Syntax
|game4= arma3
|version4= 0.50


|p1= center: [[Array]] -  |= PARAMETER1
|gr1= Positions


|p2= [radius, maxDistance]: [[Array]] - |= PARAMETER2
|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.}}


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


| [[Boolean]] |= RETURNVALUE
|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: [[Number]] - distance from the center


|x1= <code>(example)</code>|= EXAMPLE1
|p3= maxDistance: [[Number]] - distance from the end of radius


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


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


| |= MPBEHAVIOUR
|seealso= [[findEmptyPosition]]
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 18: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