distance
distance
gets/sets
the distance the radar is checking.
Type: float
Sample
Code
###############
Get distance
# get the controller.
controller = GameLogic.getCurrentController()
# get the Radar sensor attached to the controller named
GuardDuty
radar = controller.sensors["GuardDuty"]
# get distance guard is checking
dist = radar.distance
###############
Set distance
# get the controller.
controller = GameLogic.getCurrentController()
# get the Radar sensor attached to the controller named
GuardDuty
radar = controller.sensors["GuardDuty"]
# set distance guard is checking
radar.distance = 3.0
|