DjMixCuma Posted May 2, 2012 Share Posted May 2, 2012 Helo all how to create random weather with different id's ?? my ids: 7, 8, 9, 16, 11, 19, 15. i want change weather every hour. how to create this ? Link to comment
Guest Guest4401 Posted May 2, 2012 Share Posted May 2, 2012 local weathers = {7,8,9,16,11,19,15} local interval = 3600 -- in seconds setTimer( function() local randomWeather = weathers[math.random(#weathers)] -- pick a random weather setWeather(randomWeather) -- set it end ,interval*1000,0 -- repeat it infinite times ) Did you mean something like this? Link to comment
DjMixCuma Posted May 2, 2012 Author Share Posted May 2, 2012 yes, i'm stupid. i forgot that i can create this on table. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now