Global Mobilization Photocamera Module: Difference between revisions
mNo edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 31: | Line 31: | ||
<sqf inline>missionNameSpace setVariable ["gm_photocamera_feature_disabled", true];</sqf> | <sqf inline>missionNameSpace setVariable ["gm_photocamera_feature_disabled", true];</sqf> | ||
{{ConfigPage|end}} | {{ConfigPage|end}} | ||
=== Custom Cameras === | |||
If you wish to replace the currently supported cameras (by default any weapon that is inheriting from "gm_photocamera_base" can do so), you can modify the "gm_photocamera_feature_type" variable: | If you wish to replace the currently supported cameras (by default any weapon that is inheriting from "gm_photocamera_base" can do so), you can modify the "gm_photocamera_feature_type" variable: | ||
{{ConfigPage|start}} | |||
{{ConfigPage|abc}} | |||
==== gm_photocamera_feature_type ==== | |||
<sqf> | <sqf> | ||
// this will enable the GM's photocamera to work | // this will enable the GM's photocamera to work | ||
Line 42: | Line 44: | ||
</sqf> | </sqf> | ||
It is also possible to support multiple different types of weapon at the same time. To do so, change the variable to an array of supported classnames (base classes are always the better choice): | |||
<sqf> | |||
// This will allow GM's camera AND any laserdesignator to take pictures | |||
missionNameSpace setVariable ["gm_photocamera_feature_type", ["gm_photocamera_base", "Laserdesignator"]]; | |||
</sqf> | |||
{{ConfigPage|end}} | |||
[[Category:Global Mobilization]] | [[Category:Global Mobilization]] |
Latest revision as of 10:47, 9 April 2023
Overview
Global Mobilization introduces the “Enable Camera Picture Saving” Module in 3DEN. This module toggles the ability for the camera to save screenshots to your user folder.
With this module placed, anyone who will take a picture with the "Laiktika PLC3A" will actually take a screenshot of the current view.
The image will be saved to the user's documents folder where also editor missions are stored.
Read up on the screenshot command to see what restrictions apply and how to allow for more allocated space.
Scripting
Independently from this module, the camera (or any other camera inheriting from gm_photocamera_feature_type classes) will be able to simulate picture taking.
Sound and a shutter effect are played when a player uses the "Fire" button while looking through the camera's viewfinder.
This event can be utilized by custom scripting!
gm_photocamera_takePicture
The Scripted Eventhandler gm_photocamera_takePicture is available. It will trigger every time a user "fires" the camera.
[missionNamespace, "gm_photocamera_takePicture", {hint "picture taken"}] call BIS_fnc_addScriptedEventHandler;
No arguments are processed by this eventhandler.
gm_photocamera_feature_disabled
If you wish to disable the camera feature alltogether, you can simply set the gm_photocamera_feature_disabled variable to true:
missionNameSpace setVariable ["gm_photocamera_feature_disabled", true];
Custom Cameras
If you wish to replace the currently supported cameras (by default any weapon that is inheriting from "gm_photocamera_base" can do so), you can modify the "gm_photocamera_feature_type" variable:
gm_photocamera_feature_type
It is also possible to support multiple different types of weapon at the same time. To do so, change the variable to an array of supported classnames (base classes are always the better choice):