• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Weather System? (+rep)

Status
Not open for further replies.
Here is the Weather System of mine created for GangSpear's request.

Triggers and library for weather effects:
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Disable fog of war
      • Visibility - Disable black mask
      • Melee Map - Use melee time of day (for all players)
      • Hashtable - Create a hashtable
      • Set WeatherHash = (Last created hashtable)
      • -------- Weather Library --------
      • Custom script: set udg_Weather[1] = 'RAhr'
      • Custom script: set udg_Weather[2] = 'RAlr'
      • Custom script: set udg_Weather[3] = 'MEds'
      • Custom script: set udg_Weather[4] = 'FDbh'
      • Custom script: set udg_Weather[5] = 'FDbl'
      • Custom script: set udg_Weather[6] = 'FDgh'
      • Custom script: set udg_Weather[7] = 'FDgl'
      • Custom script: set udg_Weather[8] = 'FDrh'
      • Custom script: set udg_Weather[9] = 'FDrl'
      • Custom script: set udg_Weather[10] = 'FDwh'
      • Custom script: set udg_Weather[11] = 'FDwl'
      • Custom script: set udg_Weather[12] = 'RLhr'
      • Custom script: set udg_Weather[13] = 'RLlr'
      • Custom script: set udg_Weather[14] = 'SNbs'
      • Custom script: set udg_Weather[15] = 'SNhs'
      • Custom script: set udg_Weather[16] = 'SNls'
      • Custom script: set udg_Weather[17] = 'WOcw'
      • Custom script: set udg_Weather[18] = 'WOlw'
      • Custom script: set udg_Weather[19] = 'LRaa'
      • Custom script: set udg_Weather[20] = 'LRma'
      • Custom script: set udg_Weather[21] = 'WNcw'
      • -------- End of Library --------
      • Set Random_Integer = (Random integer number between 1 and 21)
      • Hashtable - Save Random_Integer as (Key weather) of (Key (Playable map area)) in WeatherHash
      • Custom script: set udg_Weather_Effect = AddWeatherEffect (GetPlayableMapRect(), udg_Weather[udg_Random_Integer])
      • Environment - Turn Weather_Effect On
      • Set Random_Integer = 0
  • Random Weather
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Set Random_Integer = (Random integer number between 1 and 21)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If- Conditions
          • Random_Integer Not equal to (Load (Key weather) of (Key (Playable map area)) from WeatherHash)
        • Then - Actions
          • Custom script: call RemoveWeatherEffect (udg_Weather_Effect)
          • Custom script: set udg_Weather_Effect = AddWeatherEffect (GetPlayableMapRect(), udg_Weather[udg_Random_Integer])
          • Environment - Turn Weather_Effect On
          • Hashtable - Save Random_Integer as (Key weather) of (Key (Playable map area)) in WeatherHash
        • Else - Actions
      • Set Random_Integer = 0
Code:
Library WeatherType

globals
constant integer WEATHER_ASHENVALE_HEAVY_RAIN = 'RAhr'
constant integer WEATHER_ASHENVALE_LIGHT_RAIN = 'RAlr'
constant integer WEATHER_DALARAN_SHIELD = 'MEds'
constant integer WEATHER_DUNGEON_HEAVY_BLUE_FOG = 'FDbh'
constant integer WEATHER_DUNGEON_LIGHT_BLUE_FOG = 'FDbl'
constant integer WEATHER_DUNGEON_HEAVY_GREEN_FOG = 'FDgh'
constant integer WEATHER_DUNGEON_LIGHT_GREEN_FOG = 'FDgl'
constant integer WEATHER_DUNGEON_HEAVY_RED_FOG = 'FDrh'
constant integer WEATHER_DUNGEON_LIGHT_RED_FOG = 'FDrl'
constant integer WEATHER_DUNGEON_HEAVY_WHITE_FOG = 'FDwh'
constant integer WEATHER_DUNGEON_LIGHT_WHITE_FOG = 'FDwl'
constant integer WEATHER_LORDAERON_HEAVY_RAIN = 'RLhr'
constant integer WEATHER_LORDARON_LIGHT_RAIN = 'RLlr'
constant integer WEATHER_NORTHREND_BLIZZARD = 'SNbs'
constant integer WEATHER_NORTHREND_HEAVY_SNOW = 'SNhs'
constant integer WEATHER_NORTHREND_LIGHT_SNOW = 'SNls'
constant integer WEATHER_OUTLAND_HEAVY_WIND = 'WOcw'
constant integer WEATHER_OUTLAND_LIGHT_WIND = 'WOlw'
constant integer WEATHER_RAY_OF_LIGHT = 'LRaa'
constant integer WEATHER_RAY_OF_MOONLIGHT = 'LRma'
constant integer WEATHER_HEAVY_WIND = 'WNcw'
endglobals

endlibrary
Here is the link to test map. Created to summon random weather effect every 5 seconds of game time, but I'm sure it will help with what you are looking for. However, if you need more precise system feel free to post your wishes here.
 
Last edited:
Status
Not open for further replies.
Top