{"name":"allCameras","title":"allCameras","type":"command","url":"https://community.bistudio.com/wiki/allCameras","revid":376999,"updated":"2026-01-01T08:07:12Z","groups":["Camera Control"],"status":"ok","games":{"arma3":"2.18"},"since":"arma3 2.18","arma3_since":"2.18","description":"Return a list of all existing cameras.","syntaxes":[{"syntax":"allCameras","params":[],"returns":{"type":"Array of Arrays","type_expr":"Array<Array>","description":"with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]\n- camera: Object - the camera itself (see camCreate) - r2tInfos: Array of Arrays with [r2tName, r2tEffectName, ppEffectType, TIindex] - r2tName: String - the camera's RTT name (see cameraEffect) - r2tEffectName: String - see cameraEffect for possible values - ppEffectType: String - one of `Normal`, `NightVision`, `Thermal`, `Colors`, `Mirror`, `ChromAber` or `FilmGrain` - TIIndex: Number - see setCamUseTI for possible values - isPrimary: Boolean - whether or not this camera is the current main one - effectName: String - (Optional, only available if isPrimary is true) see cameraEffect for possible values - viewMode: Number - (Optional, only available if isPrimary is true) 0 = normal, 1 = NVG, 2 = TI, 3 = NVG + TI - TIIndex: Number - (Optional, only available if isPrimary is true) see setCamUseTI for possible values","text":"Array of Arrays with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]\n\n- camera: Object - the camera itself (see camCreate)\n- r2tInfos: Array of Arrays with [r2tName, r2tEffectName, ppEffectType, TIindex]\n  - r2tName: String - the camera's RTT name (see cameraEffect)\n  - r2tEffectName: String - see cameraEffect for possible values\n  - ppEffectType: String - one of `Normal`, `NightVision`, `Thermal`, `Colors`, `Mirror`, `ChromAber` or `FilmGrain`\n  - TIIndex: Number - see setCamUseTI for possible values\n- isPrimary: Boolean - whether or not this camera is the current main one\n- effectName: String - (Optional, only available if *isPrimary* is true) see cameraEffect for possible values\n- viewMode: Number - (Optional, only available if *isPrimary* is true) 0 = normal, 1 = NVG, 2 = TI, 3 = NVG + TI\n- TIIndex: Number - (Optional, only available if *isPrimary* is true) see setCamUseTI for possible values"},"form":"nullary"}],"examples":[{"text":"```sqf\n{\n    params [\"_camera\", \"_r2tInfos\", \"_isPrimary\", \"_ppEffectName\", \"_viewMode\", \"_TIindex\"];\n    {\n        params[\"_r2tName\", \"_ppEffectName\", \"_ppEffectType\", \"_TIindex\"];\n    } forEach _r2tInfos;\n} forEach allCameras;\n```","code":["{\n\tparams [\"_camera\", \"_r2tInfos\", \"_isPrimary\", \"_ppEffectName\", \"_viewMode\", \"_TIindex\"];\n\t{\n\t\tparams[\"_r2tName\", \"_ppEffectName\", \"_ppEffectType\", \"_TIindex\"];\n\t} forEach _r2tInfos;\n} forEach allCameras;"]},{"text":"```sqf\nprivate _allCamerasInfo = allCameras;\n{\n    params [\"_camera\", \"\", \"_isPrimary\"];\n    if (!_isPrimary) then { camDestroy _camera };\n} forEach _allCamerasInfo;\n```","code":["private _allCamerasInfo = allCameras;\n{\n\tparams [\"_camera\", \"\", \"_isPrimary\"];\n\tif (!_isPrimary) then { camDestroy _camera };\n} forEach _allCamerasInfo;"]}],"see_also":["camCreate","camDestroy"]}