SetWeatherBlended: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Removed some confusing information and made the description a bit easier to understand) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function will change the current [[weather]] to another in a smooth manner, over the period of 2 in-game hours (unlike [[setWeather]], which sets a new weather instantly). To ensure this transition performs as expected, you should not call this function until [[getWeather]] indicates that no transition is already being done. | |||
This function will change the [[weather]] | |||
==Syntax== | ==Syntax== | ||
Line 16: | Line 15: | ||
==Example== | ==Example== | ||
This example sets the weather to sunny, then makes it change to a foggy over the period of a minute. | This example sets the weather to sunny, then makes it change to a foggy over the period of two minutes (assuming that a in-game minute is a second in real time). | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- Set the weather to sunny | -- Set the weather to sunny |
Revision as of 15:28, 28 December 2015
This function will change the current weather to another in a smooth manner, over the period of 2 in-game hours (unlike setWeather, which sets a new weather instantly). To ensure this transition performs as expected, you should not call this function until getWeather indicates that no transition is already being done.
Syntax
bool setWeatherBlended ( int weatherID )
Required Arguments
- weatherID: The ID of the weather state you wish to set. Valid values are 0 to 255 inclusive.
Returns
Returns true if successful, false if an invalid weatherID is passed.
Example
This example sets the weather to sunny, then makes it change to a foggy over the period of two minutes (assuming that a in-game minute is a second in real time).
-- Set the weather to sunny setWeather ( 0 ) -- Blend the weather to foggy setWeatherBlended ( 9 )
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel