Module SCA_RandomSensor :: Class SCA_RandomSensor

Class SCA_RandomSensor

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
            SCA_ISensor.SCA_ISensor --+
                                      |
                                     SCA_RandomSensor

This sensor activates randomly.

Instance Methods
 
setSeed(seed)
Sets the seed of the random number generator.
source code
integer
getSeed()
Returns the initial seed of the generator.
source code
 
getLastDraw()
Returns the last random number generated.
source code

Inherited from SCA_ISensor.SCA_ISensor: getFrequency, getInvert, getUseNegPulseMode, getUsePosPulseMode, isPositive, setFrequency, setInvert, setUseNegPulseMode, setUsePosPulseMode

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details

setSeed(seed)

source code 

Sets the seed of the random number generator.

If the seed is 0, the generator will produce the same value on every call.

getSeed()

source code 
Returns the initial seed of the generator. Equal seeds produce equal random series.
Returns: integer