propName
propName
gets/sets the name of the property/material that the sensor looks for.
Type: string
Sample
Code
################## Get propName
# get the controller
controller = GameLogic.getCurrentController()
# get the sensor attached to the controller named sensor
sen = controller.sensors["sensor"]
# get name of the property the sensor looks for
name = sen.propName
################## Set propName
# get the controller
controller = GameLogic.getCurrentController()
# get the sensor attached to the controller named
NearSensor
sen = controller.sensors["sensor"]
# set name of the property the sensor looks for
sen.propName = "Blue_Team"
|