Fandom

武装突袭 Wiki

FindEmptyPosition

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

  

点击图片可看到更多讯息

开始使用于

游戏:
Arma 2
版本:
1.00

描述

描述:
Searches for an empty position around specified position. The search starts looking for an empty position at a minimum distance of [minDistance] from the [center] and looks as far away as [maxDistance]. If a [vehicleType] parameter is specified, then the search will look for an empty positions that is big enough to hold that vehicle type. If an empty position isn't found, an empty array is returned.



This command ignores moving objects present within search area.

基本句法

句法:
center findEmptyPosition [minDistance, maxDistance, vehicleType]
参数:
center: Array - Search area center position. Accepts Position2D, Position3D, PositionATL or PositionASL

[minDistance, maxDistance, vehicleType]: Array

minDistance: Number - Start searching no closer than minDistance from the center

maxDistance: Number - Stop searching no further than maxDistance from the center

vehicleType: (optional): String - Class name of a vehicle to accommodate
返回值:
Array - A suitable empty position in format Position3D or [] if not found

范例

范例1:
_position = position player findEmptyPosition [0,100];

范例2:
_position = _center findEmptyPosition [10,100,"UH60M_EP1"];

范例3:
Check if exact position is empty: _position = _center findEmptyPosition [0,0,"B_Boat_Armed_01_minigun_F"];

额外资讯

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

findEmptyPositionReadyselectBestPlacesisFlatEmpty

注意事项

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

Notes

Posted on November 6, 2013
Killzone_Kid
Keep search radius short and sweet, under 50 metres maybe. Searching big area takes long time and will result in your game stop responding until the search is over. isFlatEmpty is probably more suitable for a larger area search.
Posted on March 6, 2012
old_man_auz
I think the radius parameter should be treated as a 'minimum distance' from the centre position. I found that the parameter name radius wasn't very clear. Also, if radius is greater than max distance then the function will always return an empty array.

Here is an snippet of code I use to find a safe landing zone for an extraction helicopter. It may be useful for someone. _centre = [ getMarkerPos "marker" , random 150 , random 360 ] call BIS_fnc_relPos; _extraction_point = []; _max_distance = 100; while{ count _extraction_point < 1 } do { _extraction_point = _centre findEmptyPosition[ 30 , _max_distance , "UH60M_EP1" ]; _max_distance = _max_distance + 50; }; In the above example, make sure that "_max_distance" is greater than 30, otherwise the while loop will go forever.

Bottom Section

更多维基

随机维基