Squirrel/Server/Events/Game/onWeatherChange
From Liberty Unleashed Wiki
(Difference between revisions)
(Created page with '{{Squirrel/Title|onWeatherChange}} This event is called when the world weather changes. == Syntax == <code>function onWeatherChange( int old_weather, int new_weather )</code> …') |
Latest revision as of 15:32, 4 November 2010
This event is called when the world weather changes.
[edit] Syntax
function onWeatherChange( int old_weather, int new_weather )
[edit] Arguments
- old_weather - The weather before it changes
- new_weather - The weather after changing
[edit] Returns
- 1 - Allows the weather to change normally
- 0 - Cancels the weather change
[edit] Example
This example will cancel the weather change if the new weather is foggy (ID 3).
function onWeatherChange( old, new ) { if ( new == 3 ) return 0; return 1; }
[edit] Notes
This example has no notes.
[edit] Related Events
- onSSVBridgeUpdate
- onTimeChange
- onWeatherChange