I just tried os.time() inside a print :
print(“TimeNow=”,Time.Now(),“os.time()=”,os.time())
I didn’t try using it for randomseed.
Does it work for you ?
nope, even tried tostring(os.time()) and nothing
and doesnt matter… Time.Now() is working and the function I made for random numbers and chances is using math.random…
I exectuted it 3 times after reloading the session and everytime random1 gives the same numbers in the same order when random2 really gives random numbers !
since these are results from grim dawn hook Im just gonna go with a grim dawn hook issue
did you try it with UI.Notify? could also be the reason why os.time() is working for you
and randomseed resets the numbers, using it once is fine, without using it you would get the same numbers in the same order same after setting a new seed [with the same value], so everytime you change the seed you change the sequence and since Time.Now() always returns a different number with a new session it wont have the same sequence
Thank you for your help.
I had an issue with my computer clock a few weeks ago, but it has been resolved since, so I don’t think it’s related.
Anyways, I will keep usin Time.Now as it seems to be working but I will now use math.random as I am certain it is working and really random and doesn’t need tricks to be working.
huh, what ? You should only seed once, otherwise you just mess up the RNG algorithm as you cut every sequence short and just make the whole thing less random than it otherwise would be…
Yeah, the post I replied to did not have the image yet, not really sure what I thought I read, but I was trying to explain that to get the exact same random number each time, you have to set the seed, with the same seed, before each random call.
But looking at the numbers in the image, I think I misunderstood.
yeah, just dont set a new seed for actions that occure more than once a second, I removed alot of the new seeds - even used it for loot, and of course it would just drop the same item 5 times because the new seed would always start the new same sequence
I think I only have a new seed when the world is loaded and a new portal opens.