Difference between revisions of "Photo Camera"

From Savage Game Design Wiki
Jump to navigation Jump to search
(Created page with "== Photo Camera == === Saving photos to disk === To enable saving of the camera photos to the disk place "Enable Photo Camera Picture Saving" (vn_module_photo_camera_enable_...")
 
Line 14: Line 14:
 
[true, "vn_photoCamera_pictureTaken", {
 
[true, "vn_photoCamera_pictureTaken", {
 
params ["_cursorTarget"];
 
params ["_cursorTarget"];
hint format ["You've take a photo of %1", getText (configOf _cursorTarget >> "displayName")];
+
hint format ["You've taken a photo of %1", getText (configOf _cursorTarget >> "displayName")];
 
}] call BIS_fnc_addScriptedEventHandler;
 
}] call BIS_fnc_addScriptedEventHandler;
 
</pre>
 
</pre>

Revision as of 15:08, 13 June 2023

Photo Camera

Saving photos to disk

To enable saving of the camera photos to the disk place "Enable Photo Camera Picture Saving" (vn_module_photo_camera_enable_screenshots) module in the mission. The feature uses Arma 3 screenshot command and same limitations apply to it.

Scripting

Handling pictures being taken

Every time player "captures" a picture the vn_photoCamera_pictureTaken scripted event is emmitted locally.

[true, "vn_photoCamera_pictureTaken", {
	params ["_cursorTarget"];
	hint format ["You've taken a photo of %1", getText (configOf _cursorTarget >> "displayName")];
}] call BIS_fnc_addScriptedEventHandler;

Disabling feature

To disable the feature set the vn_photoCamera_allowed variable to false

missionNamespace setVariable ["vn_photoCamera_allowed", false];

Camera feature for other weapons

To enable photo saving via other weapons add them as a key to vn_photoCameras hashmap.

vn_photoCameras set ["Rangefinder", true];

To disable photo saving via other weapon remove it from vn_photoCameras hashmap.

vn_photoCameras deleteAt "vn_camera_01";