Arma 3 Scripting

removeWeaponGlobal

  • Global argument
  • Global effect
  • Arma 3 v0.76

Command · also in Vehicle Inventory · Markdown · JSON · original wiki page

Description

Remove a weapon from a unit. An attempt to remove a weapon, which is not in unit's possession, is simply ignored.

Syntax

Syntax 1

unit removeWeaponGlobal weapon

Parameters:

Returns: Nothing

Syntax 2

since arma3 2.20

object removeWeaponGlobal [weapon, autoselect]

Parameters:

Returns: Nothing

Examples

Example 1

{
    _x removeWeaponGlobal "Laserdesignator";
} forEach allUnits;

Example 2

{
    if (typeOf _x == "O_Heli_Attack_02_black_F") then {
        _x removeWeaponGlobal "rockets_Skyfire";
    };
} forEach vehicles;

See also

addWeaponGlobal · removeWeapon · removeMagazine · removeMagazineGlobal · removeAllWeapons