Yeah there is no real documentation for it. For a good reference though have a look through my default light defs for zdoomgl. It's not too hard to figure out
Here's an attempt at some documentation
[spoiler]
Code: Select all
Firstly you must define the lights themselves:
<lighttype> <LIGHTNAME>
{
...
}
<ighttype>: They type of light. This can be "pointlight", "flickerlight", "flickerlight2", "pulselight" or "sectorlight"
LIGHTNAME: The name of the light (to be used later when binding it to objects/frames)
Inside the brackets you define the light properties. These differ for the different types of lights. Here are examples of each type (* means the property is optional):
pointlight POINT
{
color <RED> <GREEN> <BLUE>
size <SIZE>
*offset <X> <Y> <Z>
}
RED, GREEN and BLUE: Colour components (each between 0.0 and 1.0)
SIZE: Size of the light, in map units (I think)
X, Y and Z: The offset for the light in map units, with Y being the 'up' axis. Defaults to 0,0,0
pulselight PULSE
{
color <RED> <GREEN> <BLUE>
size <SIZE>
secondarySize <SECSIZE>
interval <INTERVAL>
*offset <X> <Y> <Z>
}
SECSIZE: The size to 'pulse' to. In the same units as 'size'
INTERVAL: The time it takes to complete a full pulse (from 0.0 to * (I guess), not sure on the units/scale)
flickerlight FLICKER
{
color <RED> <GREEN> <BLUE>
size <SIZE>
secondarySize <SECSIZE>
chance <CHANCE>
*offset <X> <Y> <Z>
}
SECSIZE: The second size to flicker (will alternate between SIZE and SECSIZE)
CHANCE: The chance it will flicker to the second size (same as INTERVAL from pulselight)
flickerlight2 FLICKER2
{
color <RED> <GREEN> <BLUE>
size <SIZE>
secondarySize <SECSIZE>
interval <INTERVAL>
*offset <X> <Y> <Z>
}
SIZE and SECSIZE: Lower and upper bounds for the size (the light will pick a random value between the two)
INTERVAL: The time between 'flickering' to a new random size. (same units/scale as INTERVAL for pulselight)
The sectorlight takes it's intensity from the light level of the sector it's in
sectorlight SECLIGHT
{
color <RED> <GREEN> <BLUE>
size <SIZE>
scale <SCALE>
*offset <X> <Y> <Z>
}
SCALE: How much of the containing sector's intensity to use (between 0.0 and 1.0)
Now you bind the lights to specific objects and sprite frames
object <CLASSNAME>
{
frame <SPRITENAME>
{
light <LIGHTNAME>
...
}
...
}
CLASSNAME: An actor class. A full list of these can be found at the ZDoom wiki.
SPRITENAME: The first few letters of the sprite name. For example, "MISL" will bind the light to all frames (used by that object) beginning with "MISL".
LIGHTNAME: The name of a previously defined light (see above). It is possible to bind multiple lights to a single object/frame.
[/spoiler]
Also here's a nice exampe from my zdoomgl light defs:
Code: Select all
pointlight BLURSPHERE1
{
color 1.0 0.0 0.0
size 40
offset 0 16 0
}
pointlight BLURSPHERE2
{
color 0.0 0.0 1.0
size 32
offset 0 16 0
}
pointlight BLURSPHERE3
{
color 0.0 0.0 1.0
size 24
offset 0 16 0
}
pointlight BLURSPHERE4
{
color 0.0 0.0 1.0
size 16
offset 0 16 0
}
pointlight BLURSPHERE5
{
color 0.0 0.0 1.0
size 8
offset 0 16 0
}
object BlurSphere
{
frame PINS { light BLURSPHERE1 }
frame PINSA { light BLURSPHERE2 }
frame PINSB { light BLURSPHERE3 }
frame PINSC { light BLURSPHERE4 }
frame PINSD { light BLURSPHERE5 }
}
That binds the light BLURSPHERE1 to all of the BlurSphere's frames (PINS*) for the red sphere, and extra lights on top of it (BLURSPHERE2-5 to PINSA-D) for the animated blue blob in the middle
