allCameras: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
(Fix)
Line 12: Line 12:
|s1= [[allCameras]]
|s1= [[allCameras]]


|r1= [[Array]] of existing cameras - see [[camCreate]]
|r1= [[Array]] of [[Array]]s format [camera, r2tInfos, isPrimary, ppEffectName, viewMode, TIindex]
* camera: [[Object]] - the camera itself (see [[camCreate]])
* r2tInfos: [[Array]] of [[Array]]s format [r2tName, effectName, ppEffectType, TIindex] where:
** r2tName: [[String]] - the camera's RTT name (see [[cameraEffect]])
** ppEffectName: [[String]] - {{hl|Normal}}, {{hl|NightVision}}, {{hl|Thermal}}, {{hl|Colors}}, {{hl|Mirror}}, {{hl|ChromAber}}, {{hl|FilmGrain}}
** ppEffectType: [[Number]] - ''ppEffectName'' in number format (0 = Normal, 1 = NightVision etc)
** TIIndex: [[Number]] - see [[setCamUseTI]] for possible values
* isPrimary: [[Boolean]] - whether or not this camera is the current main one
* ppEffectName: [[String]] - (Optional, only available if ''isPrimary'' is [[true]]) {{hl|Normal}}, {{hl|NightVision}}, {{hl|Thermal}}, {{hl|Colors}}, {{hl|Mirror}}, {{hl|ChromAber}}, {{hl|FilmGrain}}
* 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


|x1= <sqf>{ camDestroy _x } forEach allCameras;</sqf>
|x1= <sqf>{
params ["_camera", "_r2tInfos", "_isPrimary", "_ppEffectName", "_viewMode", "_TIindex"];
{
params["_r2tName", "_ppEffectName", "_ppEffectType", "_TIindex"];
} forEach _r2tInfos;
} forEach allCameras;
</sqf>
 
|x2= <sqf>
private _allCamerasInfo = allCameras;
{
params ["_camera", "", "_isPrimary"];
if (!_isPrimary) then { camDestroy _camera };
} forEach _allCamerasInfo;</sqf>


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

Revision as of 12:50, 16 May 2024

Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.18.

Description

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

Syntax

Syntax:
allCameras
Return Value:
Array of Arrays format [camera, r2tInfos, isPrimary, ppEffectName, viewMode, TIindex]
  • camera: Object - the camera itself (see camCreate)
  • r2tInfos: Array of Arrays format [r2tName, effectName, ppEffectType, TIindex] where:
    • r2tName: String - the camera's RTT name (see cameraEffect)
    • ppEffectName: String - Normal, NightVision, Thermal, Colors, Mirror, ChromAber, FilmGrain
    • ppEffectType: Number - ppEffectName in number format (0 = Normal, 1 = NightVision etc)
    • TIIndex: Number - see setCamUseTI for possible values
  • isPrimary: Boolean - whether or not this camera is the current main one
  • ppEffectName: String - (Optional, only available if isPrimary is true) Normal, NightVision, Thermal, Colors, Mirror, ChromAber, FilmGrain
  • 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 or on the Forums.
Only post proven facts here! Add Note