onWeatherChange

From Liberty Unleashed Wiki
Revision as of 15:32, 4 November 2010 by Juppi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This event is called when the world weather changes.

Syntax

  1. function onWeatherChange( int old_weather, int new_weather )

Arguments

  • old_weather - The weather before it changes
  • new_weather - The weather after changing

Returns

  • 1 - Allows the weather to change normally
  • 0 - Cancels the weather change

Example

This example will cancel the weather change if the new weather is foggy (ID 3).

  1.  
  2. function onWeatherChange( old, new )
  3. {
  4. if ( new == 3 ) return 0;
  5. return 1;
  6. }
  7.  

Notes

This example has no notes.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox