TimeCycle is not creatable, there's only one instance of it. It can only be accessed through its globally exposed variable.

TimeCycle gives control over game time cycle properties.


Current time of day for all players.

-- also accessible through:

Time cycle duration in seconds.

TimeCycle.Duration = 10 -- from noon to noon in 10 seconds

Returns an array of TimeCycleMarks.

TimeCycle.On = false
Time.Current = Time.Noon
TimeCycle.Marks.Noon.SkyColor = Color(255, 0, 0)
TimeCycle.Marks.Noon.HorizonColor = Color(255, 0, 0)
-- we can also use indices
TimeCycle.Marks[3].AbyssColor = Color(255, 0, 0)

Turns on/off time cycle. Stops at current time when turned off.

TimeCycle.On = false

Removes the given TimeCycleMark from the time cycle.