From 1d2cee1e02d59c92393db6302d1adadcd81ed435 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Wed, 2 Oct 2013 10:18:45 -0500 Subject: [PATCH] swing animation and a 3 second timer for chopwood --- SQF/dayz_code/actions/player_chopWood.sqf | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/SQF/dayz_code/actions/player_chopWood.sqf b/SQF/dayz_code/actions/player_chopWood.sqf index ffdc3651c..20c1efeff 100644 --- a/SQF/dayz_code/actions/player_chopWood.sqf +++ b/SQF/dayz_code/actions/player_chopWood.sqf @@ -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 {