ACE3/addons/grenades/functions/fnc_nextMode.sqf

46 lines
769 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Select the next throwing mode and display message.
*
* Arguments:
* Nothing
*
* Return Value:
* Handeled <BOOL>
*
* Example:
* [] call ace_grenades_fnc_nextMode
*
* Public: No
*/
2015-01-14 09:06:47 +00:00
#include "script_component.hpp"
private ["_mode", "_hint"];
2015-01-14 19:48:08 +00:00
2015-01-14 09:06:47 +00:00
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode == 4) then {
_mode = 0;
} else {
_mode = _mode + 1;
};
// ROLL GRENADE DOESN'T WORK RIGHT NOW
if (_mode == 3) then {
_mode = 4;
};
_hint = [
2015-05-28 19:59:04 +00:00
localize LSTRING(NormalThrow),
localize LSTRING(HighThrow),
localize LSTRING(PreciseThrow),
localize LSTRING(RollGrenade),
localize LSTRING(DropGrenade)
] select _mode;
2015-01-14 09:06:47 +00:00
[_hint] call EFUNC(common,displayTextStructured);
2015-01-14 09:06:47 +00:00
GVAR(currentThrowMode) = _mode;
2015-01-14 19:48:08 +00:00
2015-01-14 20:40:37 +00:00
true