hey folks!
I'm currently updating my weather script... to make the region and season setup much easier, but now i ran into a problem.
whenever x comes along with rand(whatever) the duration of weather effects is still fix. So i want to call rand() without its seed.
I found a solution by putting the formluar into a string and call it with eval() when it's time to make the calculations.
But is there a better option?
to make it more obvious:
when g = rand(5) i want a random integer (0 to 4) returned whenever I call g, therefore i need to get rid of the seed in rand()
I'm currently updating my weather script... to make the region and season setup much easier, but now i ran into a problem.
Code:
def setup_regions_weather_cycle
for region in @regions
case region.name
when "Outside"
region.weather_transition = 200 # Frames
region.weather_duration = x # Frames
end
end
I found a solution by putting the formluar into a string and call it with eval() when it's time to make the calculations.
But is there a better option?
to make it more obvious:
when g = rand(5) i want a random integer (0 to 4) returned whenever I call g, therefore i need to get rid of the seed in rand()