rand -- srand question

Non-platform specific questions.

rand -- srand question

Postby Just4Fun » Sun Apr 25, 2004 8:14 pm

Does GE take care of true random seeding in the rand function?

srand(time()); doesn't seem to work in the script editor.

If not, how is seeding accomplished?

Just curious..... :?: TIA
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby makslane » Sun Apr 25, 2004 8:32 pm

There is a automatic seed internally
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby ingsan » Mon Apr 26, 2004 3:05 pm

What is "seeding" ? :oops:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby makslane » Mon Apr 26, 2004 5:38 pm

If the seed is the same, game after game, your rand function will returns the same values

So, Game Editor do a automatic seeding to avoid this
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest