Turn light on and off in realtime

Hi! is there any way with apricot Build, to turn a lightsource on/off while running the game? It would save a lot of performance if we could disable a shadowspot when it is not needed …

Thx, moerdn

Sure! Try using an IPO.

Yes, to increase or decrease the amount of the energy i use an ipo, but the light is part of the rendering process, even the energy is zero. So i asked if there is a way, to complete remove an light from the scene.

You could just use an end object actuator. If you wanted to “turn it back on” You could add an empty when you end the light. The light could have logicbricks to re-add the light.

Thanks, it seams that the glsl materials don’t update correctly… if i end all the spots in the scene, the framerate increases but the spot is still there. the Shadow of an object stays also at the same place.