Clock does not return days

I have this clock. However, it does not return days. What can I do?

Aren’t you going to get a crazy time anyway, using tick? Delta time is just the gap between frames, so will different on every machine.

You could use:

317956-screenshot-1.jpg

Or:

317957-screenshot-2.jpg

EDIT: The first part is basically taking WDS and multiplying by 2000, so it will never get anywhere, because delta seconds doesn’t increase.

Hello, thanks for replying! The idea is to have an in-game clock, not the actual time of the real world. I wanted it to be based around a float that goes from 0 to 2400 so I can code other things to run on it like night and day cycle. I will try your solution and see if I can get the days to work. But isn’t Tick the way to go? Should I use a timer?

Tick is definitely not the right way to go. As I say, the time a frame takes depends on all sorts of things. Timer is not reliable either I’m afraid. Game time in seconds is probably your best bet.

I am a bit confused. Isn’t the clock supposed to run every frame, which means using the Tick? How can I run it without Tick?

The clock nodes ( like GameTimeInSeconds ) are independent of tick, that’s the whole point. You can rely on them.

Tick is a totally unpredictable interval, which is the amount of time it takes the player current hardware to render one frame. It has nothing to do with time, and is different for everyone :slight_smile:

Can you please show me how to implement it in the Blueprint I posted above? I really have no idea how to do it. Currently, I am running a Time float variable from 0 to 2400 so I can easily use it with various events I want to be happening depending on what time it is, like it is cold at night and hotter at day, or some changes to Post Process to make nights darker. Any help will be greatly appreciated, I am having hell trying to make a proper clock for months now.

Like this:

Notice that the timer node IS NOT the thing keeping time ( you could set it to any other number ). But once per second, we are just noting the game time in seconds and copying it to the variable. If it’s more than 2400, we set it back to zero. This the variable goes from 0 to 2400 repeatedly.

I’m using 2400 because that’s what you had. Of course there’s 86400 seconds in a day, but I’m assuming you’re going for a sort of ‘compressed time’ effect.

Thank you very much for sharing this, I really had no idea about It! Yes, I am going for “compressed” time with day duration selected by the developer.

No worries.