Arma 3 Scripting

Command in Unit Inventory, Vehicle Inventory

removeWeaponGlobal

Also available as Markdown and JSON, or read the 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