Jump to content

Random Weather


Electro88

Recommended Posts

Posted (edited)
function changeRandomWeather ( ) 
      setWeatherBlended ( math.random ( 0, 255 ) ) 
end  
setTimer ( changeRandomWeather, 2*60*60*1000, 0 ) 

Edited by Guest
Posted

The timer is 2*60*60*1000 = 120 minutes.

setWeatherBlended changes the weather in a 2 hours period.

If you want a faster change use setWeather instead and change the time to something lower like 30*1000 (30 secs).

Try that:

function changeWeatherRandom ( ) 
     setWeather ( math.random ( 0, 255 ) 
end  
setTimer ( changeWeatherRandom, 20*1000, 0 ) 

Then you will see how it works.

Posted

You should really work with debugscript.

There is a ")" missing for setWeather.

function changeWeatherRandom ( ) 
     setWeather ( math.random ( 0, 255 ) ) 
end 
setTimer ( changeWeatherRandom, 20*1000, 0 ) 

Posted

setWeather is changing it too fast + every 20 sec.

Its only a test-code, better use 2 hours and setWeatherBlend.

Posted

What do you even want?

I didn't understand exactly what you want.

If you mean the turkish words like s for sh, c for ch and i without the point then try to use the normal words.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...