Arma 3 Scripting

Command in Weapons

currentWeaponMode

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns current weapon mode of unit's weapon.

Warning

This command will return 0 Number if given object is a vehicle instead of a person.

You can alternatively use

_muzzle = weaponState player select 2;

Syntax

currentWeaponMode gunner

Parameters:

Returns: String - current mode's classname

Examples

Example 1

_weaponMode = currentWeaponMode player;

Example 2

_weaponMode = currentWeaponMode gunner vehicle player;

See also

ArmA: Actions · currentWeapon

Community notes