World

Tip

This is a Static Class named World. You can access it’s methods directly with :. It is not possible to initialize or create new instances.

Note

This is a Client only Class.

Functions

Returns

Name

Description

SetSunAngle(number)

Sets the sun’s angle (0-360)

SetSunSpeed(number)

Sets the sun’s time speed (default: ‘60’, which means 60 seconds in game = 1 second in real world)

SetTime(number Hours, number Minutes)

Sets the global’s time of the day

SetWeather(number)

Sets the global Weather (0 - Clear, 1 - Rain, 2 - Cloudy, 3 - Thunderstorm)

SpawnDefaultSun()

Overrides all Light/Sun Actors with the NanosWorld’s Official one, to be able to use the functions from this page

SetWind(number)

Sets the global Wind intensity

number

GetSunAngle()

number

GetSunSpeed()

number

GetTime()

(Hours * 60 + Minutes) - Goes from 0 to 1440

number

GetWeather()

number

GetWind()

Examples

-- make it rain
World:SetWeather(1)

-- make it 11:30 AM
World:SetTime(11, 30)