unitName forceWeaponFire [weapon, firemode]

Operand types

unitName: Object
[weapon, firemode] : Array

Type of returned value

Description

The unit will be forced to fire from the given weapon.
The weapon will not fire if firemode passed as parameter is not supported by the weapon.

In multiplayer command must be executed where unit is local.

  • weapon: String

  • firemode: String - Common options are "Single", "Burst", "FullAuto".


For the full list of a weapon firemodes you can do one of the following:

  • hint str (getArray (configFile >> "CfgWeapons" >> currentWeapon player >> "modes"));

  • copyToClipboard str (getArray (configFile >> "CfgWeapons" >> currentWeapon player >> "modes"));


If the token modes[] in the weapon's config is {"this"} then the weapon's classname should be used as firemode.

Used In

Arma3

Example

loon1 forceWeaponFire ["arifle_MX_F", "Single"];
Search OFPEC COMREF