useMaterial
useMaterial
gets/sets if sensor is looking for a Material or a Property
Type: Bool
1 = True
Looking
for a Material
0 = False
Looking
for a Property
Sample
Code
################## Get useMaterial
# get the controller
controller = GameLogic.getCurrentController()
# get the sensor attached to the controller named sensor
sen = controller.sensors["sensor"]
# looking for a material?
status = sen.useMaterial
################## Set property
# get the controller
controller = GameLogic.getCurrentController()
# get the sensor attached to the controller named
NearSensor
sen = controller.sensors["sensor"]
# look for a property
sen.useMaterial = False
|