dxSeedRnd(seed%)

Parameters

seed = valid integer number

Description

Computer random number generators are not truly random. They generate numbers based on a seed value (an integer number). If you 'seed' the random number generator with the same seed, it will always generate the same set of numbers. Use this command to ensure you get a good set of numbers. Usually you set the seed value to a timer or system clock value to ensure that each time the program is run, a new value is seeded. Look at the example for normal usage of this command.

Example

dxSeedRnd Millisecs() ; Seed the randomizer with the current system time in milliseconds.

NOTE: This function is not the same as the standard blitz function. Although the syntax and the operation is the same the hardwired version will provide uniform results. In blitz, the rnd values returned by B+ differ from those returned by B3D using the same seed. The hardwired random functions eradicate this difference.


Index