diff --git a/bulwark/functions/fn_endWave.sqf b/bulwark/functions/fn_endWave.sqf index 14e31c97..ba7fb260 100644 --- a/bulwark/functions/fn_endWave.sqf +++ b/bulwark/functions/fn_endWave.sqf @@ -44,4 +44,3 @@ publicVariable "MIND_CONTROLLED_AI"; // Pre-initialize loot for the next wave call loot_fnc_startPreSpawn; -sleep DOWN_TIME; diff --git a/bulwark/functions/fn_startWave.sqf b/bulwark/functions/fn_startWave.sqf index c4922cc1..6c9ab41b 100644 --- a/bulwark/functions/fn_startWave.sqf +++ b/bulwark/functions/fn_startWave.sqf @@ -10,12 +10,27 @@ ["Terminate"] remoteExec ["BIS_fnc_EGSpectator", 0]; [] remoteExec ["killPoints_fnc_updateHud", 0]; -for ("_i") from 0 to 14 do { - if(_i > 10) then {"beep_target" remoteExec ["playsound", 0];} else {"readoutClick" remoteExec ["playsound", 0];}; - [format ["%1", 15-_i], 0, 0, 1, 0] remoteExec ["BIS_fnc_dynamicText", 0]; +private "_time"; +_time = DOWN_TIME; + +while {_time > 0 && attkWave != 0} do { + _time = _time - 1; + //shows timer in the hint box on the top right only after first round + if (_time>0) then { + hintSilent format["wave %1: \n %2",attkWave+1 , [((_time)/60)+.01,"HH:MM"] call BIS_fnc_timetostring]; + }else{ + hintSilent format["wave %1 incoming", attkWave+1]; + }; + + //shows timer with sound in the middle of the screen + if(_time <= 15) then { + "beep_target" remoteExec ["playsound", 0]; + [format ["%1", _time], 0, 0, 1, 0] remoteExec ["BIS_fnc_dynamicText", 0]; + }; sleep 1; }; + "Cleaning up..." call shared_fnc_log; call hostiles_fnc_cleanupWaveUnits; @@ -151,4 +166,4 @@ else { ["TaskAssigned",["In-coming","Wave " + str attkWave]] remoteExec ["BIS_fnc_showNotification", 0]; [] call DBW_NORMALWAVE; -}; \ No newline at end of file +};