global variable Timer
System: Every ticks
-> add dt to Timer
local variable min
local variable sec
-> System: set min to floor(Timer/60)
-> System: set sec to int(Timer)%60
-> Text: set Text to right("00"&min,2)&":"&right("00"&sec,2)
dt is a special word in c2 that return the time spent between two ticks. so after 60 ticks if you run at 60fps, so 1 second later, Timer will equal 1 (what a coincidence!)
also the right(string,length) function return the right part of a string, so the expression will zero fill the number.
% is the modulo operator:
0%60 = 0
20%60 = 20
60%60 = 0
80%60 = 20
value tends to cycle when you use modulo. (officially a%b gives the remainder of the euclidian division of a by b... unofficially... easy cycling)