how to turn on and off a lamp in bge by using keyboards?

Hello everyone,

I am trying to make a light that I would like to torn on and off by using keyboard?

Does anyone have any ideas?

Help please!!

Moved from “General Forums > Blender and CG Discussions” to “Game Engine > Gane Engine Support and Discussion”

Using logic bricks you can animate the lamp energy and play the animation with an action actuator.
In the example use the spacebar to turn on/off the lamp


light.blend (98.6 KB)