Key Press

This commit is contained in:
PabstMirror 2015-01-14 13:48:08 -06:00
parent e1c08626be
commit cedb05f8d9
3 changed files with 22 additions and 12 deletions

View File

@ -4,3 +4,22 @@
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
// class ACE_Core_Default_Keys {
// class switchGrenadeMode {
// displayName = "$STR_ACE_Grenades_SwitchGrenadeMode";
// condition = "[_player] call ACE_Core_fnc_canUseWeapon";
// statement = "call ACE_Grenades_fnc_nextMode";
// key = 9;//34;
// shift = 0;
// control = 0;
// alt = 0;//1;
// };
// };
["ACE3",
localize "STR_ACE_Grenades_SwitchGrenadeMode",
{_this call FUNC(nextMode)},
[17, [false, false, false]], //8 key
false,
"keydown"] call cba_fnc_registerKeybind;

View File

@ -12,18 +12,6 @@ class CfgPatches {
};
};
class ACE_Core_Default_Keys {
class switchGrenadeMode {
displayName = "$STR_ACE_Grenades_SwitchGrenadeMode";
condition = "[_player] call ACE_Core_fnc_canUseWeapon";
statement = "call ACE_Grenades_fnc_nextMode";
key = 9;//34;
shift = 0;
control = 0;
alt = 0;//1;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgWeapons.hpp"

View File

@ -14,6 +14,8 @@
private ["_mode", "_hint"];
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode == 4) then {
@ -38,3 +40,4 @@ _hint = [
[_hint] call EFUNC(common,displayTextStructured);
GVAR(currentThrowMode) = _mode;