allCameras: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.18
|version1= 2.18
|branch= dev


|gr1= Camera Control
|gr1= Camera Control
Line 12: Line 10:
|s1= [[allCameras]]
|s1= [[allCameras]]


|r1= [[Array]] of [[Array]]s format [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]
|r1= [[Array]] of [[Array]]s with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]
* camera: [[Object]] - the camera itself (see [[camCreate]])
* camera: [[Object]] - the camera itself (see [[camCreate]])
* r2tInfos: [[Array]] of [[Array]]s format [r2tName, r2tEffectName, ppEffectType, TIindex] where:
* r2tInfos: [[Array]] of [[Array]]s with [r2tName, r2tEffectName, ppEffectType, TIindex]
** r2tName: [[String]] - the camera's RTT name (see [[cameraEffect]])
** r2tName: [[String]] - the camera's RTT name (see [[cameraEffect]])
** r2tEffectName: [[String]] - see [[cameraEffect]] for possible values
** r2tEffectName: [[String]] - see [[cameraEffect]] for possible values
Line 31: Line 29:
} forEach _r2tInfos;
} forEach _r2tInfos;
} forEach allCameras;
} forEach allCameras;
</sqf>
</sqf>


Line 39: Line 36:
params ["_camera", "", "_isPrimary"];
params ["_camera", "", "_isPrimary"];
if (!_isPrimary) then { camDestroy _camera };
if (!_isPrimary) then { camDestroy _camera };
} forEach _allCamerasInfo;</sqf>
} forEach _allCamerasInfo;
</sqf>


|seealso= [[camCreate]] [[camDestroy]]
|seealso= [[camCreate]] [[camDestroy]]
}}
}}

Latest revision as of 09:07, 1 January 2026

Hover & click on the images for description

Description

Description:
Return a list of all existing cameras.
Groups:
Camera Control

Syntax

Syntax:
allCameras
Return Value:
Array of Arrays with [camera, r2tInfos, isPrimary, effectName, viewMode, TIindex]
  • camera: Object - the camera itself (see camCreate)
  • r2tInfos: Array of Arrays with [r2tName, r2tEffectName, ppEffectType, TIindex]
  • 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

Examples

Example 1:
{ params ["_camera", "_r2tInfos", "_isPrimary", "_ppEffectName", "_viewMode", "_TIindex"]; { params["_r2tName", "_ppEffectName", "_ppEffectType", "_TIindex"]; } forEach _r2tInfos; } forEach allCameras;
Example 2:
private _allCamerasInfo = allCameras; { params ["_camera", "", "_isPrimary"]; if (!_isPrimary) then { camDestroy _camera }; } forEach _allCamerasInfo;

Additional Information

See also:
camCreate camDestroy

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note