; SeedRnd Example ; --------------- ; SeedRnd sets the starting point of the random number generator. ; The same seed always produces the SAME sequence - useful for ; repeatable tests, or procedural levels you can revisit by number. SeedRnd 1234 Print "Seed 1234, first try : "+Rand(1,100)+" "+Rand(1,100)+" "+Rand(1,100) SeedRnd 1234 Print "Seed 1234, second try: "+Rand(1,100)+" "+Rand(1,100)+" "+Rand(1,100) Print "Same seed, same numbers - every run of this example too." Print "" ; Seeding with the clock gives a fresh sequence every run - do this ; once at the start of a game for unpredictable results SeedRnd MilliSecs() Print "Seed MilliSecs() : "+Rand(1,100)+" "+Rand(1,100)+" "+Rand(1,100) Print "(different every time you run the example)" Print "" Print "Press any key to close the example" WaitKey End