{"name":"allCameras","operator":null,"title":"allCameras","type":"command","url":"https://community.bistudio.com/wiki/allCameras","revid":376999,"updated":"2026-01-01T08:07:12Z","groups":["Camera Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.18"}],"since":{"game":"arma3","name":"Arma 3","version":"2.18"},"arma3_since":"2.18","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Return a list of all existing cameras.","syntaxes":[{"syntax":"allCameras","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Array of Arrays with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]","types":["Array"],"description":"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- 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","operator":null,"left":null,"right":null}],"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;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["camCreate","camDestroy"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Camera Control","Introduced with Arma 3 version 2.18","Scripting Commands"]}