All-in-one Function Library that converts an integer variable of >>Total Seconds<< into h/m/s, then prints it as h:mm:ss. Can be used as counter or countdown. Automatically adds +0 (to m/s) if below 10. Widget-ready.
 
  • All you have to do is hook your “Total Seconds” variable into the “Time” input, and set it again at the “New Total Seconds”. For a widget, just use the “New Printed Time” string.
  • The function is called after a Delay (1s). It increments or decrements your “Total Seconds” variable, depending on the boolean checked: (Count Up = True), (Count Down = False).
  • The formatting is done within the Function Library. It was very confusing maths to extract 60 minutes and 60 seconds from a total seconds value, which took many, many google searches into mathematics forums. So this Library will alleviate the pain.
  • If you want to fire an Event at certain h/m/s value, use “New Hours/New Minutes/New Seconds” and pass it on.

It was originally created to print the game’s uptime to a widget. As a dual-function, it can be used for timers and countdowns alike. GET a Total Seconds variable as the input and SET again at the output.