---
name: "BIS_fnc_unitCaptureFiring"
type: function
status: ok
groups: ["Scenes"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_unitCaptureFiring
revid: 336358
updated: 2022-12-29T08:47:04Z
---

# BIS_fnc_unitCaptureFiring

*Function · Scenes · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.50*

Locality: executed with **spawn**

## Description

Records weapon fire data of input unit over a specified period of time. Pressing the <kbd>ESC</kbd> key, the duration ending, or the unit dying ends the recording.

## Syntax

```sqf
[unit, duration, startTime] spawn BIS_fnc_unitCaptureFiring
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - unit to capture weapon fire data from
- `duration`: [Number](../topics/Number.md) - maximum duration to capture
- `startTime`: [Number](../topics/Number.md) - (Optional, default 0) starting time offset for the frame time

**Returns:** [Script Handle](../topics/Script_Handle.md)

## Examples

### Example 1

```sqf
[BIS_Vehicle, 50, 10] spawn BIS_fnc_unitCaptureFiring;
```

### Example 2

```sqf
[[2.135, "GAU8", "<NULL-object>"], [2.157, "GAU8", "<NULL-object>"]] // output example
```

## See also

[BIS_fnc_unitCaptureSimple](../functions/BIS_fnc_unitCaptureSimple.md) · [BIS_fnc_unitPlaySimple](../functions/BIS_fnc_unitPlaySimple.md) · [BIS_fnc_unitPlayFiring](../functions/BIS_fnc_unitPlayFiring.md) · [BIS_fnc_unitCapture](../functions/BIS_fnc_unitCapture.md) · [BIS_fnc_unitPlay](../functions/BIS_fnc_unitPlay.md)

<sub>Source: [BI Community Wiki — BIS fnc unitCaptureFiring](https://community.bistudio.com/wiki/BIS_fnc_unitCaptureFiring) (revision 336358).</sub>
