---
name: "allCameras"
type: command
status: ok
groups: ["Camera Control"]
arma3_since: "2.18"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/allCameras
revid: 376999
updated: 2026-01-01T08:07:12Z
---

# allCameras

*Command · Camera Control · Arma 3 v2.18*

## Description

Return a list of all existing cameras.

## Syntax

```sqf
allCameras
```

**Returns:** [Array](../topics/Array.md) of [Array](../topics/Array.md)s with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]
- camera: [Object](../topics/Object.md) - the camera itself (see [camCreate](../commands/camCreate.md))
- r2tInfos: [Array](../topics/Array.md) of [Array](../topics/Array.md)s with [r2tName, r2tEffectName, ppEffectType, TIindex]
  - r2tName: [String](../topics/String.md) - the camera's RTT name (see [cameraEffect](../commands/cameraEffect.md))
  - r2tEffectName: [String](../topics/String.md) - see [cameraEffect](../commands/cameraEffect.md) for possible values
  - ppEffectType: [String](../topics/String.md) - one of `Normal`, `NightVision`, `Thermal`, `Colors`, `Mirror`, `ChromAber` or `FilmGrain`
  - TIIndex: [Number](../topics/Number.md) - see [setCamUseTI](../commands/setCamUseTI.md) for possible values
- isPrimary: [Boolean](../topics/Boolean.md) - whether or not this camera is the current main one
- effectName: [String](../topics/String.md) - (Optional, only available if *isPrimary* is [true](../commands/true.md)) see [cameraEffect](../commands/cameraEffect.md) for possible values
- viewMode: [Number](../topics/Number.md) - (Optional, only available if *isPrimary* is [true](../commands/true.md)) 0 = normal, 1 = NVG, 2 = TI, 3 = NVG + TI
- TIIndex: [Number](../topics/Number.md) - (Optional, only available if *isPrimary* is [true](../commands/true.md)) see [setCamUseTI](../commands/setCamUseTI.md) for possible values

## Examples

### Example 1

```sqf
{
    params ["_camera", "_r2tInfos", "_isPrimary", "_ppEffectName", "_viewMode", "_TIindex"];
    {
        params["_r2tName", "_ppEffectName", "_ppEffectType", "_TIindex"];
    } forEach _r2tInfos;
} forEach allCameras;
```

### Example 2

```sqf
private _allCamerasInfo = allCameras;
{
    params ["_camera", "", "_isPrimary"];
    if (!_isPrimary) then { camDestroy _camera };
} forEach _allCamerasInfo;
```

## See also

[camCreate](../commands/camCreate.md) · [camDestroy](../commands/camDestroy.md)

<sub>Source: [BI Community Wiki — allCameras](https://community.bistudio.com/wiki/allCameras) (revision 376999).</sub>
