I did this as a request: a code that changes randomly the weather from normal to a rainy day. Due to its configurability and easy to use (just copy it to your map and it will work) I'll post it to the public. Now the current version allows multiple types of weathers and with a few functions you can achieve very nice weather effect transitions.

How the script works?

The script initializes a timer with a random duration (configurable via globals), and it will change from no weather to a weather environment. if you use the minimalistic version, it will turn on and off in a random way the specified weather. If you use the Standard version, it will do the same but with a set of weathers configured previously. this preconfiguration can be done at map init or at game time... there's no limitation.

Credits and Acknowledgments

Greetings to Syntic_Arrow for doing the request.Credits to Ammorth for the suggestion of weights to implement randomnessGives credits when you use it...

How to install:

Create a new trigger

Call it whatever you want

Convert it to custom text

Delete all the content of that trigger

Paste this trigger code and voila!!!

Standard version

The standard version offers the possibility to setup the kind of weathers you want to see in your map and their chances to appear. To start a set of weathers, you just have to add a code like this:

Sample code

Code: jass

function StartWeather takesnothingreturnsnothing// This function can run at map init...

What's this site?

Here is the place where making your favorite games can be possible, with the support of a cordial and warm community. Here you will find resources that will help you develop your projects in an effective and agile way. In addition, you can show your projects, share your ideas or simply contribute with resources to establish bonds with a growing community, forming in the process the network of fanatic users to do Modding and mapping Warcraft 3.