2015-12-16 22:47:14 +00:00
|
|
|
/*
|
|
|
|
* Author: Grey
|
2017-09-22 15:33:08 +00:00
|
|
|
* Loads Magazine into static weapon using a timer.
|
2015-12-16 22:47:14 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2017-09-22 15:33:08 +00:00
|
|
|
* 0: Static <OBJECT>
|
|
|
|
* 1: Unit <OBJECT>
|
|
|
|
* 2: Time to load <NUMBER>
|
|
|
|
* 3: Magazine Class <STRING> (default: "")
|
2015-12-16 22:47:14 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [_target,_player,"ACE_1Rnd_82mm_Mo_HE"] call ace_mk6mortar_fnc_loadMagazineTimer
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_static","_unit","_timeToLoad",["_magazineClassOptional","",[""]]];
|
|
|
|
|
2017-09-22 15:33:08 +00:00
|
|
|
// Move player into animation if player is standing
|
2015-12-16 22:47:14 +00:00
|
|
|
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
|
|
|
|
[_unit, "AmovPercMstpSrasWrflDnon_diary", 1] call EFUNC(common,doAnimation);
|
|
|
|
};
|
|
|
|
|
2015-12-17 08:13:23 +00:00
|
|
|
[_timeToLoad, [_static,_unit,_magazineClassOptional], {(_this select 0) call FUNC(loadMagazine)}, {}, localize LSTRING(loadingMortar)] call EFUNC(common,progressBar);
|