actuator
actuator
gets/sets the name of actuator the sensor is set to monitor
Type: string
Sample
Code
################ Get actuator
# get controller
controller = GameLogic.getCurrentController()
# get sensor attached to the controller named sensor
sen = controller.sensors["sensor"]
# get actuator name to watch
name = sen.actuator
################ Set actuator
# get controller
controller = GameLogic.getCurrentController()
# get sensor attached to the controller named sensor
sen = controller.sensors["sensor"]
# set actuator name to watch
sen.actuator = "Invisible"
|