This little snipit is a day/night cycle for 3d environments.
It currently runs a whole cycle in a 1 min time period, but you can easily change it to be 10 min, 1 hour, whatever you need. It doesn't start until the clock reaches "00" or "30", so it may take up to 29 seconds to begin the cycle, depending on you clock at startup. After that, it will run continuously
I actullay wanted to make it as a function, but I can't figure out how to get the variables to pass properly. Would someone be so kind as to convert this snipit into a function? I appreciate your help.
Happy Game Creating!!!
Cyril
With math all things are possible