We have already added some non displayed lights but we need to look at them in more detail now
Mapping 101 - Adding Some Interior Lights - Tutorial 9
I think it's time we added some lights now, we have already added some non displayed lights but we need to look at them in more detail now. We will also use some displayed lights as well.
Select the light entity in the top left room and bring up the entity window (N). There are 3 main keys we are interested in here, "style" the values of which are shown in the hint window. The other 2 keys are "light" and "_color", which control the brightness and color. Enter "light" in the "Key" box and "200" for the "Value".
Now press K to bring up the color picker window , select yellow and click ok. This will automatically add the "_color" key with the correct RGB value "1.00000 1.00000 0.00000".
Now enter the "style" key and give it a value of "1". This will make a nice flickering yellow light. Compile and run the map to see. (Figure 1) Make sure you use the "Full_Vis" option from the BSP menu.
Figure 1.
Well that was pretty straight forward, so let's try a displayed light. Click here for a list of lights you can use, along with some screenshots. We'll use the "hanging". Select the light entity in the top right room, and Right-Click to bring up the entity selection menu. Select light>light_generic_hanging the entity should change, center it in the room and make sure the top is just touching the ceiling.
Once again you can change the properties of the light, but just add the "light" value of "200" this time. You should end up with Figure 2.
Figure 2.
Now we will try a spotlight, Right-Click to bring up the entity selection menu and select info>info_null. This will be the target for our spotlight.
Place it as in Figure 3, about half way up the wall in the bottom right room. Press N and type "targetname" in the key box and "spot1" in the value box. This is an identifier for our target.
Select the light entity, and add a key "target" with a value of "spot1", this tells the light to aim itself at the info_null - spot1. You should see a green line, with arrows, appear on the map. This shows us the the light is targeting the spot1 info_null.
Figure 3.
Lastly add a key "_cone" with a value of "20", this is how big the radius of the spot is. It should end up looking like Figure 4.
Figure 4.
Now for the final room, you may have noticed the "start off" key in the entity dialogue, we are now going to use this to make a switched light. So first change the light in the bottom left room to light_generic_caged and place it against the ceiling.
Now give it a "targetname" of "light1" and check the "Start_Off" box. You've probably guessed that this simply tells the game to start with this light turned off.
Now make a brush 8 x 4 x 8 and using Figure 5 as a guide place it against the wall.
Figure 5.
Right-Click while the brush is still selected and chose func_func_button.
Again while it's still selected pop up the entity dialogue and give it a "target" of "light1" (our light we made in step 11). We want the button to move towards the wall when pushed so click on the 90 button. Various other keys can be changed here too, the sound, delay etc. but we wont go into that now.
Compile the map and test it.
Figure 6.
Most of this is pretty simple, best thing to do is experiment with the values to find out how it affects the light.