Rick Posted October 2, 2015 Share Posted October 2, 2015 I don't see a seeding function in Math. How can I seed the random generator? Normally I would use: math.randomseed(os.time) but in sandbox mode you can't use 'os' object. Passing Time:GetCurrent() really doesn't help since it's the running time of the app. I'm stuck with the same numbers each run atm. Quote Link to comment Share on other sites More sharing options...
Haydenmango Posted October 2, 2015 Share Posted October 2, 2015 I found this buried deep in the forums a while back and it works well. math.randomseed( tonumber(tostring(Time:Millisecs()):reverse():sub(1,6)) ) edit- oops didn't see the other topic Quote Check out my game Rogue Snowboarding- https://haydenmango.itch.io/roguesnowboarding Link to comment Share on other sites More sharing options...
Rick Posted October 2, 2015 Author Share Posted October 2, 2015 Yeah, I didn't create 2 posts . Must have been a forum hiccup or something. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.