[RMMV] NEED HELP MAKING A PERCENTAGE BASED WEATHER SYSTEM

Posts

Pages: 1
I'm trying to make a percentage based weather system like in Morrowind. In the construction set it looks like this when it comes to weather for a region.

Region: Bitter Coast
Clear: 10
Cloudy: 60
Foggy: 10
Rain: 10
Thunder: 10

I've had a look at the variable commands but I just can't figure out how I'd make these kinds of percentages work in MV. My planned method starts off by picking a random number between 1-100. After about 1700 frames, it then starts the process again. If it detects that it has landed on the same weather, it won't fade out and change the effect.

If someone could let me know how to do this, that would be great.
It's been solved. I found a plug-in which allows ranges in variables. e.g 1-50.
You don't need a plugin. It's quite simple.

Variable weatherrandom = random value between 1 and 100.

variable currentweather = 1 (clear)
If weatherrandom > 10 then currentweather = 2 (cloudy)
If weatherrandom > 70 then currentweather = 3 (foggy)
If weatherrandom > 80 then currentweather = 4 (rain)
If weatherrandom > 90 then currentweather = 5 (thunder)

if current weather = 1 then (effects of cloudy weather)
if current weather = 2 then (effects of foggy weather)
etc



Pages: 1