ACE3/addons/grenades/functions/fnc_nextMode.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

44 lines
742 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: commy2
* Select the next throwing mode and display message.
*
* Arguments:
* None
*
* Return Value:
* Handeled <BOOL>
*
* Example:
* [] call ace_grenades_fnc_nextMode
*
* Public: No
*/
private _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;
};
private _hint = localize ([
LSTRING(NormalThrow),
LSTRING(HighThrow),
LSTRING(PreciseThrow),
LSTRING(RollGrenade),
LSTRING(DropGrenade)
] select _mode);
[_hint] call EFUNC(common,displayTextStructured);
GVAR(currentThrowMode) = _mode;
true