Different models at different times of day?

Alright, so i have this idea of an clock beging able to actually showing the time.

I have tought of maybe an animation but since i have no knowledge in animating i thought maybe its posible to let the model be different on different time in game.

Can somebody tell me if this is do-able and if it is then how to do it.

I also though about giving some windows shutters and let that work on the same mechanic that they close at night and are open at day.

Might this not be posible is someone willing to help me animate the arms of my clock?

Thanks in advance!

I did shutters as an exercise to learn modding back in the times…:

So yes, they are totally do-able. Back then I think there was a problem with adding animations to objects that didn’t have an AI, but nowadays it should be possible, I think we added something to inject them at some point, can’t remember exactly what it is, maybe take a look at the workshop component :thinking:

You can start by reusing the lamp component, which listens to sunrise and sunset to automatically turn the lamps on and off. In the json you can specify the model variant “lamp_on” that will appear when it’s night, and when it’s day it will return to the default model.

If you want more control over when to trigger what, you can create your own component based on the lamp component, listening to specific times of the day or triggering some code at specific times of the day.


Thank you! I am totaly going to implant this!

1 Like

Alright i foudn where the animation files are. I am planning on animating the clock and would like to know if you guys use and kind of program to animation .json

It seems like way to much code and pressision to do by hand.

Thanks in advance!

1 Like

Check this: