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 ray sensor attached to the controller named
GuardDuty
ray = controller.sensors["GuardDuty"]
# looking for a material?
name = ray.useMaterial
################## Set property
# get the controller
controller = GameLogic.getCurrentController()
# get the ray sensor attached to the controller named
GuardDuty
ray = controller.sensors["GuardDuty"]
# look for a property
ray.useMaterial = False
|