Random Actuator Bool Bernoulli: para1

para1
  • Returns the first parameter for the distribution being used.
     
  • Bool Bernoulli Random Actuator name: Chance

Type: 
  • float number

Range:

  • 0.00 to 1.00
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 first parameter

# 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 first parameter
name = act.para1