武装突袭 Wiki
Advertisement
Introduced with Arma 3 version 0.76
  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

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
0.76

描述

描述:
Add a weapon to a unit. Infantry units can only carry weapons in their respective slots (primary, secondary and handgun), the addWeaponGlobal command will replace the weapon currently in a slot with the added weapon if it shares the same slot. To make sure the added weapon is loaded and ready, add the magazine first.
File:Warning.png This command is broken when used on dedicated server

基本句法

句法:
unit addWeaponGlobal weapon
参数:
unit: Object - unit or vehicle to add the weapon to
weapon: String - weapon class name
返回值:
Nothing

范例

范例1:
{ _x addMagazineGlobal "Laserbatteries"; _x addWeaponGlobal "Laserdesignator"; } forEach allUnits;
范例2:
{ if (typeOf _x == "O_Heli_Attack_02_black_F") then { _x addMagazineGlobal "38Rnd_80mm_rockets"; _x addWeaponGlobal "rockets_Skyfire"; }; } forEach vehicles;

额外资讯

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

注意事项

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

Notes

Bottom Section

Posted on July 7, 2015 - 18:42 (UTC)
Killzone Kid
If you do not remove weapon first, using this command from dedicated server will duplicate weapon.
Advertisement