Add medic anim function with proper interrupt

Closes #1386

Vanilla commits
applied:
f99a3deced
731b957e8e

Removed
two unused files and a few variables made redundant by actionInProgress
This commit is contained in:
ebayShopper
2017-06-06 15:24:59 -04:00
parent 36b67affee
commit 48858b2e6c
61 changed files with 507 additions and 1341 deletions

View File

@@ -1,4 +1,4 @@
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_result"];
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_result","_finished"];
_skin = _this;
_config = configFile >> "CfgMagazines" >> _skin;
@@ -9,11 +9,20 @@ _rounded = round _rnd;
call gear_ui_init;
closeDialog 0;
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
dayz_actionInProgress = true;
//Tear the clothes
player playActionNow "Medic";
[player,"bandage",0,false] call dayz_zombieSpeak;
uiSleep 6;
if !(_skin in magazines player) exitWith {localize "str_tear_clothes_0" call dayz_rollingMessages;};
_finished = ["Medic",1] call fn_loopAction;
if (!_finished) exitWith {
dayz_actionInProgress = false;
};
if !(_skin in magazines player) exitWith {
localize "str_tear_clothes_0" call dayz_rollingMessages;
dayz_actionInProgress = false;
};
player removeMagazine _skin;
switch (_rounded) do {
@@ -48,4 +57,6 @@ while {_i < _rounded} do {
[_itemtocreate,1,1] call fn_dropItem;
};
};
true call dz_fn_meleeMagazines;
true call dz_fn_meleeMagazines;
dayz_actionInProgress = false;