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; _proceed = false;
while {_isOk} do { 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; [player,20,true,(getPosATL player)] spawn player_alertZombies;
closeDialog 1; closeDialog 1;
r_interrupt = false; r_interrupt = false;
_animState = animationState player;
r_doLoop = true; r_doLoop = true;
_started = false;
_finished = false; _finished = false;
_finishedTime = diag_tickTime+3;
while {r_doLoop} do { while {r_doLoop} do {
_animState = animationState player; if (diag_tickTime > _finishedTime) then {
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false; r_doLoop = false;
_finished = true; _finished = true;
[player,"chopwood",0,false] call dayz_zombieSpeak;
}; };
if (r_interrupt) then { if (r_interrupt) then {
r_doLoop = false; r_doLoop = false;
}; };
sleep 0.1; sleep 0.1;
}; };
if(!_finished) exitWith { if(!_finished) exitWith {