Random Actuator Bool Bernoulli: distribution

distribution
  • Returns the random distribution mode

Type: 
  • integer

Values:

  • 1 = Bool Constant
     
  • 2 = Bool Uniform
     
  • 3 = Bool Bernouilli
     
  • 4 = Int Constant
     
  • 5 = Int Uniform
     
  • 6 = Int Poisson
     
  • 7 = Float Constant
     
  • 8 = Float Uniform
     
  • 9 = Float Normal
     
  • 10 = Float Neg. Exp.
Bool Bernoulli:
  • Random Generator returns True or False.
     
  • Starting seed has no effect.
     
  • Chance of it being True or False is determined by a percentage you choose.
Sample Code


################  get the type of distribution the actuator uses

# import bge module
import bge

# get the controller
cont = bge.logic.getCurrentController()

# get the actuator attached to the controller
# my actuator is named Flip

act = cont.actuators["Flip"]

# get the type of distribution
type = act.distribution