π World
Interaction with World and Environment elements
info
π§ Authority: This can be accessed only on Client.
πΏ Static Class: This is a Static Class. You can access itβs methods directly with .
. It is not possible to initialize or create new instances.
info
Please check Interacting with Sun for further information and examples.
Static Functionsβ
Returns | Name | Beschreibung |
---|---|---|
LoadStreamLevel | Laden eines Levels wΓ€hrend der Laufzeit | |
UnloadStreamLevel | Entladen eines Levels wΓ€hrend der Laufzeit | |
SetFogDensity | ||
SetFogHeightFalloff | ||
SetFogHeightOffset | ||
SetSunLightColor | ||
SetSunLightColor | ||
SetSkyRayleighScattering | ||
SetSunLightIntensity | ||
SetSunTemperatureMultiplier | ||
SetPPBloom | Post-Prozess-Bloom-Einstellungen | |
SetPPChromaticAberration | Set Post Process Chromatic Aberration Settings | |
SetPPImageEffects | Einstellungen fΓΌr Postprozess-Bildeffekt festlegen | |
SetPPFilm | Set Post Process Film Settings | |
SetPPGlobalSaturation | Set Post Process Saturation Colors | |
SetPPMaterial | Sets a PostProcess Material | |
RemovePPMaterial | Removes the PostProcess Material | |
SetSunAngle | Sets the Sun's angle | |
SetSunSpeed | Sets the Sun's time speed | |
SetTime | Sets the global time of the day | |
SetWeather | Sets the global Predefined Weather | |
SpawnDefaultSun | Overrides all Light/Sun Actors with the NanosWorld's Official one | |
SetWind | Sets the global Wind intensity | |
number | GetSunAngle | |
number | GetSunSpeed | |
table | GetTime | Returns a table containing current Sun hours and minutes |
WeatherType | GetWeather | |
number | GetWind |
Eventsβ
Name | Beschreibung |
---|---|
StreamLevelLoaded | Called when a Stream Level is loaded |
StreamLevelUnloaded | Called when a Stream Level is unloaded |
Functions Detailedβ
LoadStreamLevel
β
Laden eines Levels wΓ€hrend der Laufzeit
World.LoadStreamLevel(level_name, should_block_on_load)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
string | level_name | ||
boolean | should_block_on_load | false | If this should be a blocking operation - the game will freeze |
UnloadStreamLevel
β
Entladen eines Levels wΓ€hrend der Laufzeit
World.UnloadStreamLevel(level_name, should_block_on_unload)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
string | level_name | ||
boolean | should_block_on_unload | false | If this should be a blocking operation - the game will freeze |
SetFogDensity
β
World.SetFogDensity(density, second_density)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | density | ||
number | second_density | 0 |
SetFogHeightFalloff
β
World.SetFogHeightFalloff(falloff)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | falloff |
SetFogHeightOffset
β
World.SetFogHeightOffset(offset)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | offset |
SetSunLightColor
β
World.SetSunLightColor(color)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
Color | color |
SetSunLightColor
β
World.SetSkyLightIntensity(ntensity)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | intensity |
SetSkyRayleighScattering
β
World.SetSkyRayleighScattering(color)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
Color | color |
SetSunLightIntensity
β
World.SetSunLightIntensity(<BasicType.Number />
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | intensity |
SetSunTemperatureMultiplier
β
World.SetSunTemperatureMultiplier(multiplier)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | multiplier |
SetPPBloom
β
Post-Prozess-Bloom-Einstellungen
World.SetPPBloom(intensity, threshold)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | intensity | 0.675 | |
number | threshold | -1 |
SetPPChromaticAberration
β
Set Post Process Chromatic Aberration Settings
World.SetPPChromaticAberration(intensity, start_offset)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | intensity | 0 | |
number | start_offset | 0 |
SetPPImageEffects
β
Einstellungen fΓΌr Postprozess-Bildeffekt festlegen
World.SetPPImageEffects(vignette_intensity, grain_jitter, grain_intensity)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | vignette_intensity | 0.6 | |
number | grain_jitter | 0 | |
number | grain_intensity | 0 |
SetPPFilm
β
Set Post Process Film Settings
World.SetPPFilm(slope , toe, shoulder, black_clip, white_clip)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | slope | 0.8 | |
number | toe | 0.55 | |
number | shoulder | 0.26 | |
number | black_clip | 0 | |
number | white_clip | 0.3 |
SetPPGlobalSaturation
β
Set Post Process Saturation Colors. Use Alpha for overall Saturation intensity
World.SetPPGlobalSaturation(color)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
Color | color |
SetPPMaterial
β
Sets a PostProcess Material
World.SetPPMaterial(material_path)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
string | material_path | The Material Asset to set as Post Process |
RemovePPMaterial
β
Removes the current Post Process Material
World.RemovePPMaterial()
SetSunAngle
β
Sets the sun's angle (0-360)
World.SetSunAngle(angle)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | angle |
SetSunSpeed
β
Sets the sun's time speed (default: '60', which means 60 seconds in game = 1 second in real world)
World.SetSunSpeed(speed)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | speed |
SetTime
β
Sets the Global time of the day
World.SetTime(hours, minutes)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | hours | ||
number | minutes |
SetWeather
β
Sets the global Predefined Weather (Clear, Rain, Cloudy, Thunderstorm)
World.SetWeather(weather)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
WeatherType | weather |
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)
Type | Parameter | Default Value | Beschreibung |
---|---|---|---|
number | intensity |
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()
Events Detailedβ
StreamLevelLoaded
β
Called when a Stream Level is loaded
Type | Parameter | Beschreibung |
---|---|---|
string | level_name |
Client.Subscribe("StreamLevelLoaded", function(level_name)
end)
StreamLevelUnloaded
β
Called when a Stream Level is unloaded
Type | Parameter | Beschreibung |
---|---|---|
string | level_name |
Client.Subscribe("StreamLevelUnloaded", function(level_name)
end)