generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: (math.randomseed(tick)) Question

Previous Thread :: Next Thread 
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
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
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
28 Nov 2011 10:41 AM
for i 1,10 do
print(math.randomseed(tick(100)) - My version
wait(1)
end
Report Abuse
Beauu is not online. 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
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
28 Nov 2011 10:50 AM
.....? Wat
Report Abuse
yoyoman2 is not online. 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
RistoReipas is not online. RistoReipas
Joined: 07 May 2009
Total Posts: 93
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
YodaimeKing is not online. YodaimeKing
Joined: 01 Nov 2009
Total Posts: 3961
28 Nov 2011 02:11 PM
Okay, thanks :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image