math.random( n , m )
produces the same “random” numbers in the same sequence, which is great for testing, but not great if you really want to create a random experience.
math.randomseed( os.time() )
seems to give me random numbers between 0 & 1.
is there any way to throw these in a bag and shake them up to produce actual random numbers while being able to control the range?
i’ll be workin on this all night, feel free to chime in, any help would be appreciated!
UPDATE
This is what I got so far. it works fine as long as you dont need a random number within 1 second because os.time()
is measured in seconds.
math.randomseed(os.time()) -- seed with the current system time
local num = math.random(1, 10) -- get randomseed within range
print(num)