timer.is_zero
Checks whether the timer's value is zero.
Example
-- -- A common use of timers is to announce the gametype name at the -- start of a round, by "sending an incident" a few seconds after -- script processing begins. -- alias announced_start = player.number[0] alias announced_timer = player.timer[0] declare player.announced_timer = 5 -- for each player do if current_player.announced_start == 0 then current_player.announced_timer.set_rate(-100%) if current_player.announced_timer.is_zero() then current_player.announced_start = 1 send_incident(action_sack_game_start, current_player, no_player) end end end