|
| 28 Nov 2011 10:41 AM |
Ok, so I was studying. math.random. When i found math.randomseed(tick())
In the tutorial it says that
math.randomseed(tick()) for i 1,10 do print(math.random(100)) wait(1) end
is baisically the same as
for i 1,10 do print(math.randomseed(tick(100)) - My version wait(1)
But when I use my verion the numbers are more spread out. Is that a coincidence? |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2011 10:41 AM |
for i 1,10 do print(math.randomseed(tick(100)) - My version wait(1) end |
|
|
| Report Abuse |
|
|
Beauu
|
  |
| Joined: 25 Nov 2011 |
| Total Posts: 214 |
|
|
| 28 Nov 2011 10:48 AM |
Nope. RANDOMSEED() is a lot more random().
How can decide over what's right, when you're clouding up my mind? |
|
|
| Report Abuse |
|
|
| |
|
yoyoman2
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 2170 |
|
|
| 28 Nov 2011 12:55 PM |
just do a random algorithm here:
math.randomseed((tick()*23-5)*8) |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2011 01:08 PM |
Well as far as I know there is no required or optional parameters for tick(). I don't get how you print numbers with your version since math.randomseed() does not return anything.
math.randomseed() is used for setting start point for math.random()
math.random() contains a formula that needs a number to return a number. When math.random() is called again it uses number before to evaluate the next number. You get pattern of numbers, if you call math.random() multiple times. And if you use constant value as seed you can repeate the pattern.
NOTE: Roblox likes to call randomseed() too. So you can't use wait() if you want to repeat pattern. |
|
|
| Report Abuse |
|
|
| |
|