robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
|
| 03 Jan 2015 01:38 AM |
| Is math.randomseed(tick())'s seed shared throughout all scripts? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
| |
|
robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
|
| 03 Jan 2015 01:48 AM |
| ok ill just run it in all the scripts ? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 03 Jan 2015 01:48 AM |
| I would think so since 1 math table but idk |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 01:55 AM |
Scropt1 math.randomseed(5)
Scropt2 print(math.random(10000))
Execute Scropt1 then Scropt2 rinse n repeat
Output: >17 >17 >17 |
|
|
| Report Abuse |
|
|
robomax11
|
  |
| Joined: 07 Jul 2011 |
| Total Posts: 6828 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 03 Jan 2015 02:01 AM |
In one script math.randomseed(1) print(math.random(-999999999, 999999999)) -->-997497482
In a different test
In script1 math.randomseed(1)
In script2 wait(1) print(math.random(-999999999, 999999999)) -->A random number |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 02:15 AM |
| You are making sure to execute them right? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 03 Jan 2015 03:37 AM |
| If they didn't execute it wouldn't be printing...? |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 03 Jan 2015 03:40 AM |
| It's not truely random tho ;) |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2015 05:01 AM |
| I'm talking about script1 without any prints. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 03 Jan 2015 05:06 PM |
Script 1 does not print anything It just set the seed
I changed it to this
wait(1) math.randomseed(1)
other script wait(2) print(math.random(-999999999, 999999999))
617481002 214331492 -997497482 -613391522
Thats from running it 4 times, 1 of them was the correct number o.O |
|
|
| Report Abuse |
|
|