removeWeapon: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category:[cC]ommand[_ ][gG]roup:[_ ][^|]+\|\{*uc:{{PAGENAME}*]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| ofp | | ofp | ||
|1.00 | |1.00 | ||
|eff= global | |eff= global | ||
|arg= local | |arg= local | ||
|gr1= Unit Inventory | |gr1= Unit Inventory | ||
|gr2= Vehicle Inventory | |gr2= Vehicle Inventory | ||
| 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]]. | | 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. | '''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. | ||
| unit '''removeWeapon''' weapon | | unit '''removeWeapon''' weapon | ||
|p1= unit: [[Object]] - unit or vehicle | |p1= unit: [[Object]] - unit or vehicle | ||
|p2= weapon: [[String]] - weapon class name | |p2= weapon: [[String]] - weapon class name | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>[[player]] [[removeWeapon]] "BAF_L85A2_RIS_SUSAT";</code> | |x1= <code>[[player]] [[removeWeapon]] "BAF_L85A2_RIS_SUSAT";</code> | ||
|x2= <code>An_2 [[removeWeapon]] "M240_veh";</code> | |x2= <code>An_2 [[removeWeapon]] "M240_veh";</code> | ||
| [[removeWeaponGlobal]], [[addWeapon]], [[removeAllWeapons]] | | [[removeWeaponGlobal]], [[addWeapon]], [[removeAllWeapons]] | ||
}} | }} |
Revision as of 01:16, 18 January 2021
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
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
Notes
- Posted on May 27, 2009 - 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.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Unit Inventory
- Command Group: Vehicle Inventory
- Scripting Commands: Global Effect
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands