{"name":"forceWeaponFire","title":"forceWeaponFire","type":"command","url":"https://community.bistudio.com/wiki/forceWeaponFire","revid":379422,"updated":"2026-10-31T00:04:25Z","groups":["Unit Control","Weapons"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"The unit will be forced to fire weapon from the given muzzle. The weapon will not fire if firemode passed as parameter is not supported by the given muzzle. The muzzle could belong to a vehicle weapon and unit in this case will be the unit operating this weapon. Doesnt't seem to work for units in FFV positions. Works on player. See also: BIS_fnc_fire","syntaxes":[{"syntax":"unit forceWeaponFire [muzzle, firemode]","params":[{"name":"unit","type":"Object","description":"unit alone or in vehicle","type_expr":"Object"},{"name":"muzzle","type":"String","type_expr":"String"},{"name":"firemode","type":"String","description":"common options are \"Single\", \"Burst\", \"FullAuto\". For the full list of a weapon firemodes:\n\n```sqf\nhint str (getArray (configFile >> \"CfgWeapons\" >> currentWeapon player >> \"modes\"));\n```\n\nIf *modes[]* param in config for the weapon says *{\"this\"}*, then the same classname as for the weapon param (currentWeapon player) should be used as firemode param.","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"[muzzle, firemode]"}}],"examples":[{"code":["_unit forceWeaponFire [\"arifle_MX_F\", \"Single\"];\n_unit forceWeaponFire [\"hgun_ACPC2_F\", \"hgun_ACPC2_F\"];\n_unit forceWeaponFire [\"HandGrenadeMuzzle\",\"HandGrenadeMuzzle\"];\n_unit forceWeaponFire [\"MiniGrenadeMuzzle\",\"MiniGrenadeMuzzle\"];\n_unit forceWeaponFire [\"HandGrenade_Stone\",\"HandGrenade_Stone\"];\n_unit forceWeaponFire [\"SmokeShellMuzzle\",\"SmokeShellMuzzle\"];\n_unit forceWeaponFire [\"ChemlightGreenMuzzle\",\"ChemlightGreenMuzzle\"];\n_unit forceWeaponFire [\"IRGrenade\",\"IRGrenade\"];\n_unit forceWeaponFire [\"Laserdesignator\",\"Laserdesignator\"];"]},{"code":["gunner blackfoot forceWeaponFire [\"gatling_20mm\", \"close\"];"]}],"see_also":["currentWeapon","currentWeaponMode","setWeaponReloadingTime","selectWeapon","fire","doFire","commandFire","canFire","fireAtTarget","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire","BIS_fnc_fire"],"notes":[{"user":"Killzone_Kid","date":"2013-08-25T00:00:00Z","text":"Here is a neat workaround trick for firemode change from a script:\n\n```sqf\n_weapon = currentWeapon player;\n_ammo = player ammo _weapon;\nplayer setAmmo [_weapon, 0];\nplayer forceWeaponFire [_weapon, \"FullAuto\"];\nplayer setAmmo [_weapon, _ammo];\n```"},{"user":"ffur2007slx2_5","date":"2014-04-14T00:00:00Z","text":"(A3 1.16) forceWeaponFire is no longer only limited to units, but can remote aircrafts weapon firing as well. Passed source unit should be the correct one who controls the weapon, if passed mode is \"this\", use the weapon name instead:\n\n```sqf\n_weapon = (weapons _veh) select 3;\n_mode = (getArray (configFile >> \"cfgweapons\" >> _weapon >> \"modes\")) select 0;\nif (_mode == \"this\") then {_mode = _weapon;};\n(driver _veh) forceWeaponFire [_weapon, _mode];\n//Force a CAS fire a rocket.\n```\n\nCurrently this command is not available for land vehicle remote fire."},{"user":"Benargee","date":"2014-09-02T00:00:00Z","text":"Similar to Killzone_Kid's note, This fires the units current weapon in its current firemode.\n\n```sqf\n_unit forceWeaponFire [weaponState _unit select 1, weaponState _unit select 2];\n```"},{"user":"Killzone_Kid","date":"2015-01-03T14:55:00Z","text":"fireAtTarget command can be used to force fire gunner weapon in vehicles. A gunner must be present.\n\n```sqf\n_veh fireAtTarget [objNull];\n```\n\nWill fire one shot even if player is gunner.\nfire command can also be used to fire vehicle weapon, like smoke launcher for example:\n\n```sqf\nvehicle player fire \"SmokeLauncher\";\n```\n\nAnd if this doesn't work, it is possible to force fire via action\n\n```sqf\ntank action [\"UseWeapon\", tank, commander tank, 0];\n```"}]}