swing animation and a 3 second timer for chopwood

This commit is contained in:
[VB]AWOL
2013-10-02 10:18:45 -05:00
parent 69703c4012
commit 1d2cee1e02

View File

@@ -53,34 +53,30 @@ if (count(_findNearestTree) >= 1) then {
_proceed = false;
while {_isOk} do {
player playActionNow "Medic";
// player playActionNow "Medic";
player playActionNow "GestureSwing";
[player,"chopwood",0,false] call dayz_zombieSpeak;
[player,20,true,(getPosATL player)] spawn player_alertZombies;
closeDialog 1;
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
_finishedTime = diag_tickTime+3;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
if (diag_tickTime > _finishedTime) then {
r_doLoop = false;
_finished = true;
[player,"chopwood",0,false] call dayz_zombieSpeak;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
if(!_finished) exitWith {