Page 1 of 1

rand -- srand question

PostPosted: Sun Apr 25, 2004 8:14 pm
by Just4Fun
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

PostPosted: Sun Apr 25, 2004 8:32 pm
by makslane
There is a automatic seed internally

PostPosted: Mon Apr 26, 2004 3:05 pm
by ingsan
What is "seeding" ? :oops:

PostPosted: Mon Apr 26, 2004 5:38 pm
by makslane
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