removeWeapon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
m (Text replacement - ">Posted on May ([0-9]{2}), ([0-9]{4})" to ">Posted on $2-05-$1")
 
Line 51: Line 51:


<dt><dt>
<dt><dt>
<dd class="notedate">Posted on May 27, 2009 - 14:30 (CEST)</dd>
<dd class="notedate">Posted on 2009-05-27 - 14:30 (CEST)</dd>
<dt class="note">[[User:ZGuba|zGuba]]</dt>
<dt class="note">[[User:ZGuba|zGuba]]</dt>
<dd class="note">CTD may occur in certain conditions: when shooter is AI and is currently shooting at target in some proximity (tested with M136 on ACE 1.08 and Compact Fix 1.14H+). Even "dropweapon" action may cause CTD with AI.
<dd class="note">CTD may occur in certain conditions: when shooter is AI and is currently shooting at target in some proximity (tested with M136 on ACE 1.08 and Compact Fix 1.14H+). Even "dropweapon" action may cause CTD with AI.


</dl>
</dl>

Latest revision as of 00:00, 14 May 2023

Hover & click on the images for description

Description

Description:
Remove weapon from a unit. The unit must be local to the computer where command is executed. For a global version of this command see removeWeaponGlobal. Note: It is possible to create invalid combinations with this command (ie, attempting to remove a weapon that a unit does not possess). When doing so, application behaviour is undefined.
Groups:
Unit InventoryVehicle Inventory

Syntax

Syntax:
unit removeWeapon weapon
Parameters:
unit: Object - unit or vehicle
weapon: String - weapon class name
Return Value:
Nothing

Examples

Example 1:
player removeWeapon "BAF_L85A2_RIS_SUSAT";
Example 2:
An_2 removeWeapon "M240_veh";

Additional Information

See also:
removeWeaponGlobal addWeapon removeAllWeapons

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on 2009-05-27 - 14:30 (CEST)
zGuba
CTD may occur in certain conditions: when shooter is AI and is currently shooting at target in some proximity (tested with M136 on ACE 1.08 and Compact Fix 1.14H+). Even "dropweapon" action may cause CTD with AI.