seed
seed
Note:
If seed is 0, the generator
will return the same value on every call.
gets/sets the initial seed the generator uses.
Type: integer
Sample
Code
################# Get seed
#get controller
controller = GameLogic.getCurrentController()
# get random actuator named act attached to the
controller
actRandom = controller.actuators["act"]
# get initial seed
seed = actRandom.seed
################# Set seed
#get controller
controller = GameLogic.getCurrentController()
# get random actuator named act attached to the
controller
actRandom = controller.actuators["act"]
# set initial seed
actRandom.seed = 2
|