dynamic lighting in lightbulb

is there any method by which i can have the enrgy of my lightbulb change dynamically using bge??
plan to have a lamp inside the bulb…
any other suggestion for lightening and get my light energy to change?

You can simply animate the energy of the light. You can animate most anything in 2.57.

thank you… but i need to do it using python…
any tutorials?

Yeah, you can use a script to access the lamp object’s energy property. Simply using

cont = logic.getCurrentController()
obj = cont.owner
obj.energy = .5
obj.color = [1.0, 0.0, 0.0]

etc. should work

thank you!!
also if i want this lamp energy not to affect my surrounding a lot then scaling the lamp would be a better option or reducing the DISTANCE of the lamp?
i actually just want the lamp to glow at different energies.

You can’t scale the lamp to change the radius - you have to use the distance property (or energy, if that’s all you want).