Toggling lights through Kismet
In the previous recipe we set a Material toggle using two Set Material actions in Kismet. This only changes the Material on a mesh however, not the light cast in the scene. For that we are using PointLights. However, to make a PointLight so it can be turned on and off, it must be converted to a PointLightToggleable. This is what we'll cover in the recipe, along with setting up a control for this converted light using a simple Toggle action.
Getting ready
The scene we'll work with would take a while to set up, so a starting point has been provided. From the provided content, load the map Packt_04_ToggleableLights_Start.UDK. The scene includes at one end of a passage two switch elements and some lamp meshes. The lamps have a Material with a flickering Emissive channel, but the Material is insufficient to illuminate the surroundings. A standard PointLight sits in front of the smallest lamp, and we'll convert it to a light type that can be toggled in Kismet.