SetWeatherBlended

From Multi Theft Auto: Wiki
Revision as of 10:31, 24 June 2018 by Bonus (talk | contribs) (It's not directly 2 hours, it's 1-2 hours)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function will change the current weather to another in a smooth manner, over the period of 1-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 one-two hours (assuming that a in-game hour is a minute in real time).

-- Set the weather to sunny
setWeather ( 0 )
-- Blend the weather to foggy
setWeatherBlended ( 9 )

See Also