Skip to content

Commit

Permalink
Ignore previous commit, this is the script
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuel committed Jan 14, 2016
1 parent bfb03e8 commit 39c8c5a
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions FP_Template.VR/xtra/scripts/camera_man.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Script: Camera_man
Description:
Provdes camera man utilities. Execute from initPlayerLocal.sqf and change
"unitName" in the example to the object name of the unit that should have
camera utils.
Can open BIS camera,
Ctrl + B Disabled hud
Parameters
_unit = Unit to give camera utils to
Examples:
(begin example)
// initPlayerLocal.sqf
[missionNamespace getVariable ["unitName", objNull]] call compile preprocessFileLineNumbers "xtra\scripts\camera_man.sqf";
(end)
Author:
Cuel 2016-01-14
*/

params ["_unit"];
if (!hasInterface || {!(local _unit)}) exitWith {};

_unit createDiaryRecord
["Diary",["CAMERA MAN INFORMATION","
Youn can turn on BIS camera with the action menu.<br />
Pressing L in BIS camera disables HUD<br /><br /><br />
Camera man can toggle HUD outside BIS cam by pressing Ctrl+B (won't hide ST HUD)
To turn off ST Hud, press alt+shift+H<br /><br />
"]];

// createdisplay "RscDisplayDebugPublic";

[["<t color='#ff8a00'>\\ Open BIS Cam //</t>", {
["Init"] spawn BIS_fnc_camera;
}, 0, -99, false, true, "", ""]] call CBA_fnc_addPlayerAction;

[] spawn {
CU_shownHud = true;
waitUntil {!isNull (findDisplay 46)};
(findDisplay 46) displayAddEventHandler ["keyDown", {
params ["", "_dikCode", "", "_ctrl"];
private _res = false;
if (_ctrl && _dikCode == 48) then {
showHUD [!CU_shownHud, !CU_shownHud, !CU_shownHud, !CU_shownHud, !CU_shownHud, !CU_shownHud, !CU_shownHud, !CU_shownHud];
CU_shownHud = !CU_shownHud;
_res = true;
};
_res
}];
};

0 comments on commit 39c8c5a

Please sign in to comment.