distance
distance
get/set the maximum distance the light illuminates.
Type: float number
Sample Code
######################### get light distance
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named Lamp
light = lightList["OBLamp"]
# get the distance light reaches
dist = light.distance
########################### set light distance
# get the current scene
scene = GameLogic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get the light named Lamp
light = lightList["OBLamp"]
# set max distance
light.distance = 50.5
|