Fandom

武装突袭 Wiki

IsFlatEmpty

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 2
版本:
1.00

描述

描述:
Checks given position against given filter params. Filter includes checks for:

  • If there are any objects closer than given distance from given position (in 2D)
  • If the area around position is flat enough to match given gradient
  • If the given position is over water or land
  • If the given position is over shore line

The gradient seems to correlate with general hill steepness: 0.1 (10%) ~6o, 0.5 (50%) ~27o, 1.0 (100%) ~45o, etc.There are also some oddities about this command that need to be noted:

  • Objects accounted for proximity check seem to be static objects. Nearby vehicles and units do not seem to affect the output
  • Given position will be magically transferred into given position + getTerrainHeightASL value
  • The second element must be -1 (<= 0 really) at all times, otherwise command becomes unusable
  • The command might be a bit heavy on computations so avoid frequent and large area checks

基本句法

句法:
position isFlatEmpty [minDistance, -1, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]
参数:
position: Array - position in format PositionAGL

[minDistance, -1, maxGradient, maxGradientRadius, overLandOrWater, shoreLine, ignoreObject]: Array

minDistance (Optional): Number - Objects within 50m cannot be closer than minDistance. -1 to ignore proximity check. Default: -1

-1 (Optional): Number - Position check mode (DON'T CHANGE). Default: -1

maxGradient (Optional): Number - Maximum terrain steepness allowed. -1 to ignore. Default: -1

maxGradientRadius (Optional): Number - How far to extend gradient check. Default: 1

overLandOrWater (Optional): Number - 0: position cannot be over water; 2: position cannot be over land. -1 to ignore. Default: 0

shoreLine (Optional): Boolean - true: position is over shoreline (< ~25 m from water). false to ignore. Default: false

ignoreObject (Optional): Object - Object to ignore in proximity checks. objNull to ignore. Default: objNull
返回值:
Array - Empty array [] if check failed or PositionASL if succeded. Resulting position will be original PositionAGL + getTerrainHeightASL

范例

范例1:
Check if player position is over land:_overLand = !(position player isFlatEmpty [-1, -1, -1, -1, 0, false] isEqualTo []);

范例2:
Check if player position is over shore line:_overShore = !(position player isFlatEmpty [-1, -1, -1, -1, 0, true] isEqualTo []);

范例3:
Check if player position is over water:_overWater = !(position player isFlatEmpty [-1, -1, -1, -1, 2, false] isEqualTo []);

范例4:
Check if no object is closer than 5m to player position:_isEmpty = !(position player isFlatEmpty [5, -1, -1, -1, -1, false, player] isEqualTo []);

范例5:
Check if area 10m around player position is relatively flat:_isFlat = !(position player isFlatEmpty [-1, -1, 0.3, 10, -1] isEqualTo []);

范例6:
Check if area 15m around player position is very flat and empty:_isFlatEmpty = !(position player isFlatEmpty [15, -1, 0.1, 15, -1, false, player] isEqualTo []);

额外资讯

多人游戏:
-
也可以看看:

selectBestPlacesfindEmptyPosition

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Bottom Section

更多维基

随机维基