The "set_task" function has a flag that allows it to count the time until the end of the map:
Quote:
Optional set of flags:
"a" - repeat timer a set amount of times
"b" - loop indefinitely until timer is stopped
"c" - time interval is treated as absolute time after
map start
"d" - time interval is treated as absolute time before
map change
|
So, instead of using maths, you can do:
Code:
set_task(300.0, "Hook5MinutesRemaining", .flags = "d")
__________________