Timer is a common feature especially in casual games. I use it a lot as well so I decided to make a plugin to make timer display more comfortable.
TR_ClockParser simply converts number of seconds to clock-string. There are few expressions to use.
Download:
[C2 plugin]
Plugin icon by totoe - thanks!
TR_ClockParser.Minimal(seconds) - Return the smallest possible clock string.
Examples:
TR_ClockParser.Minimal(30) -> "30"
TR_ClockParser.Minimal(90) -> "01:30",
TR_ClockParser.Minimal(4830) -> "01:20:30"
TR_ClockParser.MMSS(seconds) - Return the "MM:SS" clock string.
Examples:
TR_ClockParser.MMSS(30) -> "00:30"
TR_ClockParser.MMSS(90) -> "01:30"
TR_ClockParser.MMSS(4830) -> "80:30"
TR_ClockParser.HHMMSS(seconds) - Return the "HH:MM:SS" clock string.
Examples:
TR_ClockParser.HHMMSS(30) -> "00:00:30"
TR_ClockParser.HHMMSS(90) -> "00:01:30"
TR_ClockParser.HHMMSS(4830) -> "01:20:30"
TR_ClockParser.ToSeconds(timeString) - Converts the specified clock string to seconds.
Examples:
TR_ClockParser.ToSeconds("01:03:30" ) -> 3810
TR_ClockParser.ToSeconds("15:30") -> 930
TR_ClockParser.ToSeconds("30") -> 30