isFlatEmpty: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 60: Line 60:
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on August 11, 2015 - 17:30 (UTC)</dd>
<dt class="note">[[User:Gippo|Gippo]]</dt>
<dd class="note">
The '''onShore''' parameter on '''true''' only returned the array with position if I was near water (on shore).
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 19:30, 11 August 2015

Hover & click on the images for description

Description

Description:
Check if given area is flat and empty.
Groups:
Uncategorised

Syntax

Syntax:
position isFlatEmpty [float minDistance,float precizePos,float maxGradient,float gradientRadius,float onWater,bool onShore,object skipobj]
Parameters:
position: Array -
[float minDistance,float precizePos,float maxGradient,float gradientRadius,float onWater,bool onShore,object skipobj]: Array -
Return Value:
Array

Examples

Example 1:
_isFlat = (position _preview) isflatempty [
		(sizeof typeof _preview) / 2,	//--- Minimal distance from another object
		0,				//--- If 0, just check position. If >0, select new one
		0.7,				//--- Max gradient
		(sizeof typeof _preview),	//--- Gradient area
		0,				//--- 0 for restricted water, 2 for required water,
		false,				//--- True if some water can be in 25m radius
		_preview			//--- Ignored object
	];

Additional Information

See also:
selectBestPlacesfindEmptyPosition

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

Posted on september 12, 2010 - 12:09 (CEST)
Lou Montana
The returned pos is ASL. Use setPosASL or fly !
Posted on april 15, 2013 - 20:12 (UTC)
HELLinG3R
isFlatEmpty returns an array holding a valid position or an empty array the check failed.


Bottom Section

Posted on August 11, 2015 - 17:30 (UTC)
Gippo
The onShore parameter on true only returned the array with position if I was near water (on shore).