working with UPBGE 0.30.0 alpha here.
I need to set and get the energy of a light at runtime. I tried with:
import bge scene = bge.logic.getCurrentScene() light = scene.lights["L1_obj"] print(light.name) # prints correct name, so light object is being found print(light.energy) # throws exception: KX_LightObject has no attribute 'energy' print(help(light)) # tried also print(dir(light))
If I’m not mistaken, according to the documentation:
the attribute ‘energy’ should exist, and is also used in the examples.
What am I missing?