Trying to make a clock.

I’m trying to make a “clock”.

I’ve got an idea of how the logic should work. “Minutes” variable should build until 60, at which point it triggers an event that adds 1 to the “Hours” and resets the counter for “Minutes”, and for “Hours” 24 would trigger an event adding to the “Days” counter with the same effect. I’ve got little idea how to start.

I’m hoping to use it as a base system to drive all sorts of things, such as the animation of a clock, drive a time-of-day lighting system, and trigger world events based on the time.

I’m not really sure where to start.

Hmm I don’t know what you realy try to do but with Event Tick and Delta Seconds this should be very easy.
Add up Delta Seconds from your Event Tick until that amout is greater then a minute of miliseconds (60 * 100) and substract that amount from your counter (you will never be milisecond correct because of the framerate). Do this until your minute counter is equal 60 and reset your minute counter to 0 add 1 to your hour counter…and so on.

Maybe there is a better way somebody know of…

I found this google doc while searching, Page 40-46 is about making a 24 hour clock. I think it’s a good basis to start from for what I want to do, of course I want to modify it so that seconds are like “minutes” and minutes of real-time are like “hours”, and hours closer to “days”.