From 474135fcdfa6ad8546873dac339f0ff98ce50217 Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Fri, 11 Oct 2013 13:06:55 -0500 Subject: [PATCH] simplify timer build timer --- SQF/dayz_code/actions/player_build.sqf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 7a5856b23..d8d4b420d 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -184,7 +184,7 @@ if (_hasrequireditem) then { _position = getPosATL _object; cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to build.", "PLAIN DOWN"]; - _counter = time; + _previewCounter = 60; _objHupDiff = 0; _objHdwnDiff = 0; @@ -315,7 +315,10 @@ if (_hasrequireditem) then { deleteVehicle _object; }; - if((time-_counter) >= 60) exitWith { + cutText [format["%1",_previewCounter], "PLAIN DOWN"]; + _previewCounter = _previewCounter - 1; + + if(_previewCounter <= 0) exitWith { _isOk = false; _cancel = true; _reason = "Ran out of time to find position."; @@ -331,8 +334,6 @@ if (_hasrequireditem) then { deleteVehicle _object; }; - cutText [format["%1",(time-_counter)], "PLAIN DOWN"]; - if (player getVariable["combattimeout", 0] >= time) exitWith { _isOk = false; _cancel = true;