SetWeatherBlended: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Note in Note Box template)
No edit summary
Line 2: Line 2:
{{Server client function}}
{{Server client function}}
{{Note box|This is based on an in-game minute duration of 1,000 milliseconds}}
{{Note box|This is based on an in-game minute duration of 1,000 milliseconds}}
This function will change the weather from the current weather (set using [[setWeather]]) to another weather state over a period of 60 seconds. The weather will be fully changed within 2 minutes. To ensure smooth weather transition, you should not call this function until [[getWeather]] indicates that no transition is already being done.
This function will change the [[weather]] from the current weather (set using [[setWeather]]) to another weather state over a period of 60 seconds. The weather will be fully changed within 2 minutes. To ensure smooth weather transition, you should not call this function until [[getWeather]] indicates that no transition is already being done.


==Syntax==  
==Syntax==  
Line 10: Line 10:


===Required Arguments===  
===Required Arguments===  
*'''weatherID:''' The ID of the weather state you wish to set. Valid values are 0 to 255 inclusive.
*'''weatherID:''' The ID of the [[weather]] state you wish to set. Valid values are 0 to 255 inclusive.


===Returns===
===Returns===

Revision as of 19:01, 8 December 2014

This template is no longer in use as it results in poor readability. This function will change the weather from the current weather (set using setWeather) to another weather state over a period of 60 seconds. The weather will be fully changed within 2 minutes. To ensure smooth weather transition, 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 a minute.

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

See Also

Shared