
energy
- gets/sets the brightness of the light.
Type:
- float number
Range:
- 0.00 to 10.00

Sample Code
################## get the light's brightness
# import bge
import bge
# get current scene
scene = bge.logic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get light named TableLamp
light = lightList["TableLamp"]
# get light's brightness
bright = light.energy
Sample Code
################## set the light's brightness
# import bge
import bge
# get current scene
scene = bge.logic.getCurrentScene()
# get a list of the lights in the scene
lightList = scene.lights
# get light named TableLamp
light = lightList["TableLamp"]
# set light's brightness
light.distance = 1.5