toggle lights active\inactive

how do i toggle lights active\inactive?

and how do i stop a light from going through walls?

the color of a lamp can be modified with an ipo actuator, so can its energy [probably what you want], which, if you like can even be made negative

either make each room on its own layer, or don’t try. Try to use static lighting instead.

i know

but i was wondering so i could have more than 8 lights on a layer and toggle them on or off depending on how close the player is.

You can add a near sensor to every lamp that look for the camera, and connect it to a visibility actuator. Then add another sensor with the same settings but with negative trigger that hides the lamp.

Otherwise you can put a python script in a controller linked to the lamps and do the same with a python script.