How to turn of light_environment

I have a couple lighting questions. Yes I know this should go in the questions megathread but that doesnt get much attention and I know some people know the answer to some of these.

  1. How can I turn off a light_environment? I saw that it was possible in the “Real Day/Night” thread but no one ever said how.

  2. Is it possible to change the color of lights/light_spots via a button?

  3. I have about 20 lights with the same name but 6 of them are a different color and have a different appearance (strobe). When I run the game and turn on those 20 lights, the colors are correct but the 6 lights do not strobe. They are constant like the rest of the lights. I am unable to name them something else as I get an error if I do, but it shouldnt matter as I though that names only mattered for I/O.

1: Press the ‘Smart Edit’ button to disable smart edit and add a new property called targetname; the value of the property should be the light’s name.

2: No.

3: Some settings are shared between lights that have the same name because their rays are baked into the same lightmaps. You’re going to have problems here, because only about 2 toggleable lights with unique names can be used in proximity to eachother before they overload their respective lightmaps and cause visual errors. Lights that flicker are very expensive entities, as each state of the light has its own lightmap, so having two flickering lights with unique names in proximity to eachother without visual errors is an impossibility.

Read all about lighting here:

To change the colour of a light, say from red to green, make 2 lights with the same settings called Redlight for red and Greenlight for green. Then add a button. Make an output of it “on pressed” “greenlight” “turnon” and make another output “on pressed” “redlight” “turnoff”. Then go to your green light and in the “Flags” tab tick “start dark”. When you compile the level, the red light should be on, and when you press the button, the red light will switch off as the green light turns on. I don’t know how you would do this for a day/night…maybe a timer of some kind? but I don’t know how you’d do dunrise or sunset.

Thanks. I got the light environment to turn off and everything is working great.