Random Actuator Bool Bernoulli: propName

propName
  • gets/sets the name of the boolean property the actuator uses.

Type: 
  • string
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 name of the property 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 name of the property
name = act.propName
 
Sample Code


################  Set the name of the property 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"]

# set the name of the boolean property
act.propName = "Tails"