library Weather initializer SetGlobals
globals
private integer array WeatherEffect
private weathereffect LastCreatedWeatherEffect = null
private boolean DeleteLastWeather = true
endglobals
private function SetGlobals takes nothing returns nothing
set WeatherEffect[1] = 039;RAhr039;
set WeatherEffect[2] = 039;RAlr039;
set WeatherEffect[3] = 039;MEds039;
set WeatherEffect[4] = 039;FDbh039;
set WeatherEffect[5] = 039;FDbl039;
set WeatherEffect[6] = 039;FDgh039;
set WeatherEffect[7] = 039;FDgl039;
set WeatherEffect[8] = 039;FDrh039;
set WeatherEffect[9] = 039;FDrl039;
set WeatherEffect[10] = 039;FDwh039;
set WeatherEffect[11] = 039;FDwl039;
set WeatherEffect[12] = 039;RLhr039;
set WeatherEffect[13] = 039;RLlr039;
set WeatherEffect[14] = 039;SNbs039;
set WeatherEffect[15] = 039;SNhs039;
set WeatherEffect[16] = 039;SNls039;
set WeatherEffect[17] = 039;WOcw039;
set WeatherEffect[18] = 039;WOlw039;
set WeatherEffect[19] = 039;LRaa039;
set WeatherEffect[20] = 039;LRma039;
set WeatherEffect[21] = 039;WNcw039;
//AshenvaleRainHeavy = 1
//AshenvaleRainLight = 2
//DalaranShield = 3
//DungeonBlueFogHeavy = 4
//DungeonBlueFogLight = 5
//DungeonGreenFogHeavy = 6
//DungeonGreenFogLight = 7
//DungeonRedFogHeavy = 8
//DungeonRedFogLight = 9
//DungeonWhiteFogHeavy = 10
//DungeonWhiteFogLight = 11
//LordaeronRainHeavy = 12
//LordaeronRainLight = 13
//NorthrendBlizzard = 14
//NorthrendSnowHeavy = 15
//NorthrendSnowLight = 16
//OutlandWindHeavy = 17
//OutlandWindLight = 18
//RaysOfLight = 19
//RaysOfMoonlight = 20
//WindHeavy = 21
endfunction
function CreateWeather takes integer i, rect r returns nothing
if i > 21 or i < 1 then
call BJDebugMsg("Number is not within range of index, defaulting to 1.")
set i = 1
endif
if DeleteLastWeather == true and LastCreatedWeatherEffect != null then
call RemoveWeatherEffect( LastCreatedWeatherEffect)
endif
set LastCreatedWeatherEffect = AddWeatherEffect( r, WeatherEffect<i>)
call EnableWeatherEffect( LastCreatedWeatherEffect , true)
endfunction
endlibrary
</i>
Say, I has an idea, how about the ability to grow plants? You could use the weather, weathermakers, whatever. You could grow different kinds of trees, like trees for lumber or defensive thorn trees. You could also grow food on "gardens". In gardens, you could either grow herbs or buy them. Herbs could give bonuses to your units or release toxic chemicals at the enemy.
EDIT: How about adding more "nature" to maps too? Add like beehives and critters that do stuff and interact with stuff around them instead of just wandering aimlessly. Some water critters would be nice if you're adding a naval element. Maybe add some neutral hostile critters like sharks and bears for some extra creeps. For dungeon maps, you can add egg sacks and stuff like that, maybe add mutative acid which mutates units that touch it. Creep camps could maybe have traps that go off when units walk into them, like things that ensnare and put units in cages. I'm getting a little wacky, but I just mean make the map itself more interactive and fun so there's more to play around with, plus it would make it more aesthetically pleasing.
The weather system should work now. I had a stupid mistake..
There's gnomes now? Where did they come from?
library Weather initializer SetGlobals
globals
private integer array WeatherEffect
private weathereffect LastCreatedWeatherEffect = null
endglobals
private function SetGlobals takes nothing returns nothing
set WeatherEffect[1] = 039;RAhr039;
set WeatherEffect[2] = 039;RAlr039;
set WeatherEffect[3] = 039;MEds039;
set WeatherEffect[4] = 039;FDbh039;
set WeatherEffect[5] = 039;FDbl039;
set WeatherEffect[6] = 039;FDgh039;
set WeatherEffect[7] = 039;FDgl039;
set WeatherEffect[8] = 039;FDrh039;
set WeatherEffect[9] = 039;FDrl039;
set WeatherEffect[10] = 039;FDwh039;
set WeatherEffect[11] = 039;FDwl039;
set WeatherEffect[12] = 039;RLhr039;
set WeatherEffect[13] = 039;RLlr039;
set WeatherEffect[14] = 039;SNbs039;
set WeatherEffect[15] = 039;SNhs039;
set WeatherEffect[16] = 039;SNls039;
set WeatherEffect[17] = 039;WOcw039;
set WeatherEffect[18] = 039;WOlw039;
set WeatherEffect[19] = 039;LRaa039;
set WeatherEffect[20] = 039;LRma039;
set WeatherEffect[21] = 039;WNcw039;
//AshenvaleRainHeavy = 1
//AshenvaleRainLight = 2
//DalaranShield = 3
//DungeonBlueFogHeavy = 4
//DungeonBlueFogLight = 5
//DungeonGreenFogHeavy = 6
//DungeonGreenFogLight = 7
//DungeonRedFogHeavy = 8
//DungeonRedFogLight = 9
//DungeonWhiteFogHeavy = 10
//DungeonWhiteFogLight = 11
//LordaeronRainHeavy = 12
//LordaeronRainLight = 13
//NorthrendBlizzard = 14
//NorthrendSnowHeavy = 15
//NorthrendSnowLight = 16
//OutlandWindHeavy = 17
//OutlandWindLight = 18
//RaysOfLight = 19
//RaysOfMoonlight = 20
//WindHeavy = 21
endfunction
function CreateWeather takes integer i, rect r returns nothing
local integer e = 0
if i > 21 or i < 1 then
call BJDebugMsg("Number is not within range of index, defaulting to 1.")
set i = 1
endif
if e != 1 then
set e = 1
set LastCreatedWeatherEffect = AddWeatherEffect( r, WeatherEffect<i>)
call EnableWeatherEffect( LastCreatedWeatherEffect , true)
else
call RemoveWeatherEffect( LastCreatedWeatherEffect)
set LastCreatedWeatherEffect = AddWeatherEffect( r, WeatherEffect<i>)
call EnableWeatherEffect( LastCreatedWeatherEffect , true)
endif
endfunction
endlibrary</i></i>