武装突袭 Wiki
Advertisement
  Arguments of this scripting command don't have to be local to the client the command is executed on

點擊圖片可看到更多訊息

開始使用於

遊戲:
Armed Assault
版本:
1.05

描述

描述:
Return the role a unit is assigned to within its assigned vehicle. The array which is returned contains:
  • [] - Not assigned to any vehicle
  • ["Driver"] - Assigned as driver
  • ["Cargo"] (or ["Cargo", [turret path]] since Arma 3 1.31.127272) - Assigned as cargo
  • ["Turret", [turret path]] - Assigned to a turret
If no vehicle role is assigned, an empty array is returned.

基本句法

句法:
Array = assignedVehicleRole unitName
參數:
unitName: Object
返回值:
Array

範例

範例1:
_RoleArray = assignedVehicleRole player;
範例2:
Get weapons available to player at player occupied turret:_weaponsTurret = vehicle player weaponsTurret (assignedVehicleRole player select 1);

額外資訊

多人遊戲:
-
也可以看看:
addVehicleassignedVehicleunassignVehicleweaponsTurretassignAsCargoassignAsCommanderassignAsDriverassignAsGunnerassignAsTurret

注意事項

此處撰寫句法皆為可行用法. 可到官網[1]專頁回報錯誤. 你可以使用討論頁面或是論壇來進行討論.
新增注意事項 | 如何新增?

Notes

Posted on August 31, 2013
Killzone_Kid
When unit with unassigned vehicle role enters a vehicle, it gets assigned vehicle role automatically. The unit then will hold on to its assigned role after exiting the vehicle.

To add, when player is in the group of AIs and is not the leader, assignedVehicleRole of the player could be unpredictable and absolutely not related to the position player occupies. In short, forget about this command, it is unreliable and has been broken too many times in the past.

Bottom Section

Posted on November 15, 2014 - 23:31 (UTC)
Tajin
In multiplayer (tested in v1.34), this only works reliably on the server.

Behaviour is as follows:
On a client, the command will return empty arrays for every unit that is not local.
On the server, the command correctly returns the position, regardless of the units locality.
Advertisement