Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:2.00

Description

Description:Check if given area is flat and empty.

Syntax

Syntax:position isFlatEmpty [minDistance,precisePos,maxGradient,gradientRadius,onWater,onShore,ignore]
Parameters:
  • position: Position-2 - Area center to check
  • minDistance: Number - Minimal distance from another object
  • precisePos: Number - If 0, then only the defined center is checked, If >0, then an alternative position that meets the criteria might be returned
  • maxGradient: Number - Maximum gradient/slope allowed
  • gradientRadius: Number - Radius of area to check for gradient
  • onWater: Number - 0: no water allowed, !=0: shorelines allowed
  • onShore: Boolean - If true then some water can be in 25m radius
  • ignore: Object - Object to ignore when examining location (optional, default:objNull)
Return Value:PositionASL or empty array - If the original position meets the criteria, it is returned; or, if precisePos was >0 then an alternative position may be returned. If no qualified position could be found, an empty array is returned.

Examples

Examples:
_isFlat = (getPos player) isFlatEmpty[2,0.7,2,0,false,player]

Additional Information

See also: selectBestPlaces, findEmptyPosition
Multiplayer: 
Problems: 

Notes