Fandom

武装突袭 Wiki

SetVehiclePosition

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

  Arguments of this scripting command don't have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network

点击图片可看到更多讯息

开始使用于

游戏:
Armed Assault
版本:
1.00

描述

描述:
Moves the object to a given position (same as createVehicle placement algorithm). Uses either the position that's defined by the position param, or one of the marker positions from the markers array. The object is placed inside a circle with position as its center and placement as its radius. The type of placement could also be controlled with special.

If position is in water and vehicle can float, it is placed on water surface, otherwise it is placed on the ground, even if ground is under water. If roof surfaces support walking, units will be placed on roofs if such position is given.

基本句法

句法:
object setVehiclePosition [position, markers, placement, special]
参数:
object: Object

[position, markers, placement, special]: Array

position: Position, Position2D or Object - Desired placement position. If object is given, object position is used for position. Normally only x and y are considered, unless "CAN_COLLIDE" is used for special placement.

markers: Array of Strings - If the markers array contains one or more marker names, the position is chosen randomly and could be one of the marker positions or just the supplied main position. If marker had z coordinate set with setMarkerPos, the vehicle will be placed on the nearest surface below this z coordinate

placement: Number - The vehicle is randomly placed inside a circle with given position as center and placement as its radius

special (Optional): String - Could be one of the following:

  • "NONE" - will look for suitable empty position near given position (subject to other placement params) before placing vehicle there.
  • "CAN_COLLIDE" places vehicle at given position (subject to other placement params), without checking if others objects can cross its 3D model.
  • "FLY" - if vehicle is capable of flying and has crew, it will be made airborne at default height.

If special is "" or not specified, default "NONE" is used.

返回值:
Boolean - true on success, false on failure

范例

范例1:
player setVehiclePosition [[1000,2000], ["Pos1","Pos2","Pos3"], 0, "CAN_COLLIDE"]; Will place the player at either [1000,2000], or one of the three markers positions.

范例2:
heli setVehiclePosition [player, [], 0, "FLY"];

范例3:
_cam = "camera" camCreate [0,0,0]; _cam setDir random 360; _cam setVehiclePosition [[5000,5000], [], 1000, "NONE"]; _cam setPosWorld (getPosWorld _cam vectorAdd [0,0,1.8]); _cam cameraEffect ["Internal", "Back"];

额外资讯

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

setPoscreateUnitsetPosASLsetPosWorldsetPosWorldcreateVehiclesetPosAGLS

注意事项

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

Notes

Bottom Section

Posted on June 24, 2015 - 15:43 (UTC)
Killzone Kid
If you need to set direction as well, set it before using setVehiclePosition. The command will use existing dir of the object for its calculations. player setDir random 360; player setVehiclePosition [player, [], 100, "none"];

更多维基

随机维基