---
name: "BIS_fnc_fire"
type: function
status: ok
groups: ["Weapons", "Object Manipulation", "Combat"]
arma3_since: "1.74"
locality: {"argument": "global", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_fire
revid: 347331
updated: 2023-09-11T00:28:50Z
---

# BIS_fnc_fire

*Function · Weapons, Object Manipulation, Combat · Arma 3 v1.74*

Locality: arguments **global** · effect **global**

## Description

Makes a unit or a vehicle fire given muzzle. Make sure that there is some ammo to fire, and, in case of a unit, the weapon with given muzzle is already selected. It can be used to fire pretty much any muzzle on unit or vehicle from anywhere. Available weapons could usually be found with [weapons](../commands/weapons.md), [weaponsTurret](../commands/weaponsTurret.md) and [allTurrets](../commands/allTurrets.md) commands.

## Syntax

```sqf
[entity, muzzle, turret] call BIS_fnc_fire
```

**Parameters:**

- `entity`: [Object](../topics/Object.md) - unit or vehicle
- `muzzle`: [String](../topics/String.md) -  muzzle name of the muzzle to fire
- `turret`: [Array](../topics/Array.md) - (Optional) turret path of the turret with given muzzle (vehicles only)

**Returns:** [Boolean](../topics/Boolean.md) - in SP and on hosted server in MP or [Nothing](../topics/Nothing.md) on client in MP. When boolean, [true](../commands/true.md) if all checks have passed and muzzle should have fired, [false](../commands/false.md) if there was a problem, like:
- no ammo
- non-existing muzzle
- the muzzle is on a weapon that is not selected
- the weapon has no unit operating it

## Examples

### Example 1

```sqf
marshall = "B_APC_Wheeled_01_cannon_F" createVehicle position player;
createVehicleCrew marshall;

[marshall, "HE"] call BIS_fnc_fire; // fires HE muzzle of the main cannon
[marshall, "AP"] call BIS_fnc_fire; // fires AP muzzle of the main cannon
[marshall, "autocannon_40mm_CTWS"] call BIS_fnc_fire; // fires HE muzzle, because it is default
[marshall, "LMG_M200_body"] call BIS_fnc_fire; // fires machine gun
[marshall, "SmokeLauncher"] call BIS_fnc_fire; // fires smoke launcher
[marshall, "TruckHorn"] call BIS_fnc_fire; // beeps the horn
```

### Example 2

```sqf
[bob, "SmokeShellMuzzle"] call BIS_fnc_fire;  // bob throws smoke grenade, if he has one
[bob, "HandGrenadeMuzzle"] call BIS_fnc_fire; // bob throws hand grenade, if he has one
```

### Example 3

```sqf
blackfoot = "B_Heli_Attack_01_dynamicLoadout_F" createVehicle position player;
createVehicleCrew blackfoot;

[blackfoot, "missiles_DAGR"]   call BIS_fnc_fire; // fires missiles
[blackfoot, "missiles_ASRAAM"] call BIS_fnc_fire; // fires missiles
[blackfoot, "gatling_20mm"]    call BIS_fnc_fire; // fires machine gun
[blackfoot, "CMFlareLauncher"] call BIS_fnc_fire; // fires chaff
```

### Example 4

```sqf
[vehicle mortargunner, "mortar_82mm"] call BIS_fnc_fire; // mortargunner fires mortar
```

## Multiplayer

The function is global, it is not to be used in unit fields.

## Problems

unit will not fire its weapon from FFV position. This is due to [forceWeaponFire](../commands/forceWeaponFire.md) command ignoring units in FFV.

## See also

[fire](../commands/fire.md) · [fireAtTarget](../commands/fireAtTarget.md) · [forceWeaponFire](../commands/forceWeaponFire.md)

<sub>Source: [BI Community Wiki — BIS fnc fire](https://community.bistudio.com/wiki/BIS_fnc_fire) (revision 347331).</sub>
