Ask any level designer what the most time consuming part of level design is, and they will most likely answer: lighting. The fact is, lighting isn't that difficult in implementation, but rather in choices of lighting, and the amount of options available. We'll try to break down the choices here.

Lights, since they are just point entities with working defaults, and are among the easiest entities to add.

Key Value Pairs
This is the brightness of the light. Default is 300. The fall-off distance of the light is proportional (the brighter the light, the further it shines.)
In order to change the light value, simply add a key of " light " with the desired keyvalue.
One thing worthy of mention. Light entities differ from lit surfaces, in that the amount of light that a surface emits is dependent on the size of the face, whereas two light entities with the same " light " keyvalue will always emit the same amount of light, regardless of color. (which is why software Q2 always looks so bright)

This is the color that the light entity will emit. The actual color is determined by a set of three numbers between 0 and 1, representing red, green, and blue, respectively. The _color values are proportional, meaning that a value of " 0.1 0.1 0.1 " would give you exactly the same thing as " 1 1 1 ", and " 0.5 1 1 " would give you the same as " 0.25 0.5 0.5 "

"_color" "0 0 1" would emit blue light in gl
"_color" "1 1 1" would emit white light in gl
"_color" "0.5 0.5 0.5" would emit white in gl
"color" "1 0 0" would emit red light in gl, but kick out a "color is not a field" warning in software. (moral: use the underscore _color).
To make color selection easier use MENU->MISC->Select Entity Color (K) to open the color picker menu.


_minlight is a very strange key value pair that can be used with certain entities like func_door, func_button, func_rotating, etc, etc. Basically any visual entity except the item entities. What it does is makes the object glow. Lets say you have a very dark room and there is a button the player has to press but it is so dark that the player is not going to be able to find it. Well, this is where _minlight can come in very handy. Select the func_button entity and give it a key value pair of _minlight and a value of 1. This will make the func_button glow a faint white so it will be more visible.

The glow from _minlight does not make the surronding area any brighter, just the object that has the _minlight value.

The values for _minlight should be between 0 and 2. I have not noticed any difference with exteremly high values. 2 seems to be the max.

The style key determines whether or not the light will be a dynamic light, and if so what pattern it will follow. The default is 0 (static).

Here are the values, and their patterns. 'a' represents total darkness, and 'z' represents double brightness. 'm' is normal brightness (nabbed from the gamex86.dll source):

12-31 open for modification
32-62 reserved by QRAD3 for switchable light styles, and 63 is reserved for testing

In order to make a dynamic light, simply add a key of "style" and the appropriate value. (ex: "style" "5" will make a gentle pulsing light.)

A light entity can only target one thing: an info_null. What happens when you target an info_null? a spot light happens. Personally, I dig spotlights, and use them a lot. Here's how you do it.

Create a light. Give it a "target" key, and a keyvalue (we'll use "spot1".) Create an info_null at the place at which you want the spotlight to point . Give the info_null a "targetname" key, and keyvalue (again, "spot1".)

Now, what if you want a wider spotlight? Well, that's why we have the _ CONE key.
The default _cone value is 10. The higher the value, the wider the spot. To use it, add the " cone " key, and the desired value to the light entity.

Switchable lights
Let's say we wan't a light to be turned on or off by some other event (be it a button, trigger, etc..) What we need to do in this case, is to set up the triggering event (in this case, a func_button ) and give it a " target " (we'll use " lt1 ".) Now, we need to create a light, and give it a " targetname " of " lt1 ". We now have a light that turns off when we hit the button. If you would like the light to turn on when you hit the button, set the start_off spawnflag for the light.



The light mines are simply predefined lights that are the lights that were used on the mine levels in quake2. They act like normal lights they just have a predefined shape. Here are pics of them.



NOTE: If you want to rotate a light_mine (1 or 2) you have to give it an "angle" key.

I should probably insert information about creating suns here.