Page 1 of 1

math.random sync?

Posted: 20 Jan 2009, 19:46
by Anarchid
I have a Suspicion. So, can anyone tell me whether math.random will sync when invoked within a gadget's synced context? :P

Re: math.random sync?

Posted: 20 Jan 2009, 19:49
by Kloot
Yes.

Re: math.random sync?

Posted: 20 Jan 2009, 19:52
by lurker
You have to go out of your way to desync.

Code: Select all

local desyncedstring = ''
for i=1,5 do
  local t = {} for i = 10,99 do t[{}]=i end
  local _,digits = next(t)
  desyncedstring = desyncedstring .. digits
end