# Disabled by default: remove # from the filename to enable this script.
# this script will show the remaining time for respawn waves
!-- OnEvent RoundStarted
$separator = " "
# forever loop makes it continue until the server restarts
# so we dont have to worry about the respawn timer stopping
forever
wait 1s
# fetch duration to next wave for chaos
$chaosWave = FormatDuration {GetWaveTimer chaosWave} "MMm SSs"
$miniChaosWave = FormatDuration {GetWaveTimer miniChaosWave} "MMs SSs"
# fetch duration to next wave for mtf
$mtfWave = FormatDuration {GetWaveTimer mtfWave} "MMm SSs"
$miniMtfWave = FormatDuration {GetWaveTimer miniMtfWave} "MMs SSs"
# create the hint to be sent to spectators
$hint = "respawn waves:
"
$hint = $hint + "Chaos Wave - {$chaosWave}" + $separator
$hint = $hint + "MTF Wave - {$mtfWave}
"
$hint = $hint + "Mini Chaos Wave - {$miniChaosWave}" + $separator
$hint = $hint + "Mini MTF Wave - {$miniMtfWave}
"
# send the hint to spectators
Hint @spectatorPlayers 2s $hint
end