ACE3/addons/fcs/initKeybinds.sqf

82 lines
2.4 KiB
Plaintext
Raw Normal View History

2015-02-11 13:51:21 +00:00
// by commy2
2015-02-03 22:03:43 +00:00
["ACE3",
localize "STR_ACE_FCS_LaseTarget",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
2015-02-03 22:03:43 +00:00
2015-02-11 13:51:21 +00:00
// prevent holding down
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
GVAR(isDownStateKey1) = true;
2015-02-03 22:03:43 +00:00
// Statement
2015-02-04 02:20:55 +00:00
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyDown);
2015-02-03 22:03:43 +00:00
// Return false so it doesn't block the rest weapon action
false
},
[15, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_FCS_LaseTarget",
{
2015-02-11 13:51:21 +00:00
// prevent holding down
GVAR(isDownStateKey1) = false;
2015-02-03 22:03:43 +00:00
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {false};
// Statement
2015-02-04 02:20:55 +00:00
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
2015-02-03 22:03:43 +00:00
false
},
[15, [false, false, false]],
false,
"keyup"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_FCS_AdjustRangeUp",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
// Statement
2015-02-04 02:20:55 +00:00
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
2015-02-03 22:03:43 +00:00
true
},
[201, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;
["ACE3",
localize "STR_ACE_FCS_AdjustRangeDown",
{
// Conditions: canInteract
_exceptions = [];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
// Statement
2015-02-04 02:20:55 +00:00
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);
2015-02-03 22:03:43 +00:00
true
},
[209, [false, false, false]],
false,
"keydown"
] call cba_fnc_registerKeybind;