Fandom

武装突袭 Wiki

NearestTerrainObjects

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

Introduced with Arma 3 version 1.54
  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
1.54

描述

描述:
Returns a list of nearest terrain objects of the given types to the given position or object, within the specified distance. If more than one object is found they will be ordered according to distance2D to the object (i.e. the closest one will be first in the array). In contrast to nearestObjects this command returns terrain placed objects like trees, rocks and buildings which don't necessarily need an associated config class.

position can use the format:

[[x,y,z], ["Type",...], radius]

or

[object, ["Type",...], radius]


To use it without any type filter:

[object or position, [], radius]

Possible type names:"TREE", "SMALL TREE", "BUSH", "BUILDING", "HOUSE", "FOREST BORDER", "FOREST TRIANGLE", "FOREST SQUARE", "CHURCH", "CHAPEL", "CROSS", "ROCK", "BUNKER", "FORTRESS", "FOUNTAIN", "VIEW-TOWER", "LIGHTHOUSE", "QUAY", "FUELSTATION", "HOSPITAL", "FENCE", "WALL", "HIDE", "BUSSTOP", "ROAD", "FOREST", "TRANSMITTER", "STACK", "RUIN", "TOURISM", "WATERTOWER", "TRACK", "MAIN ROAD", "ROCKS", "POWER LINES", "RAILWAY", "POWERSOLAR", "POWERWAVE", "POWERWIND", "SHIPWRECK", "TRAIL"

基本句法

句法:
nearestTerrainObjects [position, types, radius]

参数:
position: Object or Array in format PositionAGL or Position2D - where to find objects, center position.

types: Array - list of types of the objects to search for.

radius: Number - range from center position to search for objects.
返回值:
Array - array of terrain objects sorted according to distance2D

范例

范例1:
nearestTerrainObjects [player, ["Tree","Bush"], 200];

范例2:
nearestTerrainObjects [player, ["House"], 200];

范例3:
nearestTerrainObjects [[2716,2949,0], ["Chapel","Fuelstation"], 100];

范例4:
Return every terrain object in 50 metres radius around player:nearestTerrainObjects [player, [], 50]

额外资讯

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

findNearestEnemyhideObjectnearestBuildingnearestObjectnearObjectsnearestLocationnearEntitiesnearTargetsnearSuppliesnearestLocationWithDubbingnearObjectsReadynearRoads

注意事项

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

Notes

Bottom Section

更多维基

随机维基