isSwitchingWeapon: Difference between revisions

From Bohemia Interactive Community
No edit summary
Tag: Reverted
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 16: Line 16:
|r1= [[Boolean]] - [[true]] if the unit is switching weapon.
|r1= [[Boolean]] - [[true]] if the unit is switching weapon.


|x1= <sqf>isSwichingWeapon player;</sqf>
|x1= <sqf>isSwitchingWeapon player;</sqf>


|seealso= [[primaryWeaponMagazine]] [[primaryWeaponItems]] [[addPrimaryWeaponItem]] [[removePrimaryWeaponItem]] [[removeAllPrimaryWeaponItems]] [[secondaryWeapon]] [[handgunWeapon]] [[currentWeapon]] [[weapons]] [[primaryWeapon]]
|seealso= [[primaryWeaponMagazine]] [[primaryWeaponItems]] [[addPrimaryWeaponItem]] [[removePrimaryWeaponItem]] [[removeAllPrimaryWeaponItems]] [[secondaryWeapon]] [[handgunWeapon]] [[currentWeapon]] [[weapons]] [[primaryWeapon]] [[setUnitLoadout]]
}}
 
{{Note
|user= OverlordZorn
|timestamp= 20250820141018
|text= as of 2.20, this does not return true when the unit is prone
}}
}}

Latest revision as of 16:10, 20 August 2025

Hover & click on the images for description

Description

Description:
Returns wether or not the unit is in the process of switching weapon.
Groups:
Unit Inventory

Syntax

Syntax:
isSwitchingWeapon unit
Parameters:
unit: Object
Return Value:
Boolean - true if the unit is switching weapon.

Examples

Example 1:
isSwitchingWeapon player;

Additional Information

See also:
primaryWeaponMagazine primaryWeaponItems addPrimaryWeaponItem removePrimaryWeaponItem removeAllPrimaryWeaponItems secondaryWeapon handgunWeapon currentWeapon weapons primaryWeapon setUnitLoadout

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
OverlordZorn - c
Posted on Aug 20, 2025 - 14:10 (UTC)
as of 2.20, this does not return true when the unit is prone