|
| 22 Mar 2014 07:23 PM |
Okay I experimented, and although I knew this, it proved it. math.random(1, 20) does NOT return a random number. I don't care what you say, but it doesn't. I have a standard Lua app on my iPod, Everytime I restart it, the "random" numbers, start over from the same number. How exactly could we MAKE a random number generator? No matter how many times you use math.random() it won't be random, so don't say this...
N = math.random(1, math.random(1, math.random(1, math.random(1, math.random(1, 9999))))) |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 07:25 PM |
| don't you do randomseed or soemthing |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 22 Mar 2014 07:25 PM |
math.randomseed(tick())
Yeah |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 07:26 PM |
| That still wouldn't be random... |
|
|
| Report Abuse |
|
|
3rdblox
|
  |
| Joined: 09 Dec 2012 |
| Total Posts: 4741 |
|
|
| 22 Mar 2014 08:05 PM |
| Computers cannot generate true random numbers. They have to use algorithms. The only "true" RNGs use dangerous chemicals. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 08:09 PM |
| So it really isn't possible? |
|
|
| Report Abuse |
|
|
3rdblox
|
  |
| Joined: 09 Dec 2012 |
| Total Posts: 4741 |
|
|
| 22 Mar 2014 08:23 PM |
| Well, you can get seemingly random things happening, but there is no way you could create a true random number generator with ROBLOX. Pseudo worked for every other developer, video game RNG abuse has only ever happened in Pokemon. Honestly, I wouldn't be so worried about players abusing the fact that you can't make a real RNG. Just put math.randomseed(tick()) at the start of every script that uses math.random() and you should be fine. |
|
|
| Report Abuse |
|
|
|
| 22 Mar 2014 08:29 PM |
| I really wanna make one now though... |
|
|
| Report Abuse |
|
|