Skip to main content
Version: latest - a1.0.0 βš–οΈ

🌍 World

Interaction with World and Environment elements

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.

This is a Client only Class.

info

Please check Interacting with Sun for further information and examples.

Interacting with the Suncore-concepts/scripting/interacting-with-the-sun

Static Functions#

ReturnsNameDescription
LoadStreamLevelLoads a Level in runtime
SetFogDensity
SetFogHeightFalloff
SetFogHeightOffset
SetSunLightColor
SetSkyLightIntensity
SetSkyRayleighScattering
SetSunLightIntensity
SetSunTemperatureMultiplier
SetPPBloomSet Post Process Bloom Settings
SetPPChromaticAberrationSet Post Process Chromatic Aberration Settings
SetPPImageEffectsSet Post Process Image Effect Settings
SetPPFilmSet Post Process Film Settings
SetPPGlobalSaturationSet Post Process Saturation Colors
SetSunAngleSets the Sun's angle
SetSunSpeedSets the Sun's time speed
SetTimeSets the global time of the day
SetWeatherSets the global Predefined Weather
SpawnDefaultSunOverrides all Light/Sun Actors with the NanosWorld's Official one
SetWindSets the global Wind intensity
UnloadStreamLevelUnloads a Level in runtime
numberGetSunAngle
numberGetSunSpeed
tableGetTimeReturns a table containing current Sun hours and minutes
WeatherTypeGetWeather
numberGetWind

LoadStreamLevel#

Loads a Level in runtime

World.LoadStreamLevel(level_name)
TypeParameterDefault ValueDescription
numberlevel_name

SetFogDensity#

>

World.SetFogDensity(density, second_density)
TypeParameterDefault ValueDescription
numberdensity
numbersecond_density0

SetFogHeightFalloff#

>

World.SetFogHeightFalloff(falloff)
TypeParameterDefault ValueDescription
numberfalloff

SetFogHeightOffset#

>

World.SetFogHeightOffset(offset)
TypeParameterDefault ValueDescription
numberoffset

SetSunLightColor#

>

World.SetSunLightColor(color)
TypeParameterDefault ValueDescription
Colorcolor

SetSkyLightIntensity#

>

World.SetSkyLightIntensity(ntensity)
TypeParameterDefault ValueDescription
numberintensity

SetSkyRayleighScattering#

>

World.SetSkyRayleighScattering(color)
TypeParameterDefault ValueDescription
Colorcolor

SetSunLightIntensity#

>

World.SetSunLightIntensity(<BasicType.Number />
TypeParameterDefault ValueDescription
numberintensity

SetSunTemperatureMultiplier#

>

World.SetSunTemperatureMultiplier(multiplier)
TypeParameterDefault ValueDescription
numbermultiplier

SetPPBloom#

Set Post Process Bloom Settings

World.SetPPBloom(intensity, threshold)
TypeParameterDefault ValueDescription
numberintensity0.675
numberthreshold-1

SetPPChromaticAberration#

Set Post Process Chromatic Aberration Settings

World.SetPPChromaticAberration(intensity, start_offset)
TypeParameterDefault ValueDescription
numberintensity0
numberstart_offset0

SetPPImageEffects#

Set Post Process Image Effect Settings

World.SetPPImageEffects(vignette_intensity, grain_jitter, grain_intensity)
TypeParameterDefault ValueDescription
numbervignette_intensity0.6
numbergrain_jitter0
numbergrain_intensity0

SetPPFilm#

Set Post Process Film Settings

World.SetPPFilm(slope , toe, shoulder, black_clip, white_clip)
TypeParameterDefault ValueDescription
numberslope0.8
numbertoe0.55
numbershoulder0.26
numberblack_clip0
numberwhite_clip0.3

SetPPGlobalSaturation#

Set Post Process Saturation Colors. Use Alpha for overall Saturation intensity

World.SetPPGlobalSaturation(color)
TypeParameterDefault ValueDescription
Colorcolor

SetSunAngle#

Sets the sun's angle (0-360)

World.SetSunAngle(angle)
TypeParameterDefault ValueDescription
numberangle

SetSunSpeed#

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

World.SetSunSpeed(speed)
TypeParameterDefault ValueDescription
numberspeed

SetTime#

Sets the Global time of the day

World.SetTime(hours, minutes)
TypeParameterDefault ValueDescription
numberhours
numberminutes

SetWeather#

Sets the global Predefined Weather (Clear, Rain, Cloudy, Thunderstorm)

World.SetWeather(weather)
TypeParameterDefault ValueDescription
WeatherTypeweather

SpawnDefaultSun#

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

World.SpawnDefaultSun()

SetWind#

Sets the global Wind intensity

World.SetWind(intensity)
TypeParameterDefault ValueDescription
numberintensity

UnloadStreamLevel#

Unloads a Level in runtime

World.UnloadStreamLevel(level_name)
TypeParameterDefault ValueDescription
stringlevel_name

GetSunAngle#

Returns number

World.GetSunAngle()

GetSunSpeed#

Returns number

World.GetSunSpeed()

GetTime#

Returns a table containing current Sun hours and minutes

Returns {hours, minutes}

World.GetTime()

GetWeather#

Returns WeatherType

World.GetWeather()

GetWind#

Returns number

World.GetWind()