PUT SOME LIGHT ON THE SUBJECT

----

Light effects can do much to enhance the look of your build. Since CNW version 3.1, we have been able to create effects that mimic things like a flickering fire, a flashing emergency light or an electric light going bad. You can create a light trigger that fades from dark to light and another trigger doing the opposite for a realistic looking rheostat-type light switch!

Using the Light command (or any other action command for that matter) causes increased lag and reduces the frame rate so it should be used sparingly. Your CNW browser will allow up to 7 different objects programmed with a light command to be displayed simultaneously so don't pack an area with too many objects programmed with Light commands. Also, each object that reflects that light can only display the light from the nearest object to it that is programmed to shine. The objects that contain the Light command will not reflect light coming from itself, in other words, it will not glow with the light that you program into it, only the surrounding objects will.

The brightness of the light that "shines" on a particular object also depends on the diffuse component of the surface lighting properties of that object. That simply means that some objects are programmed to reflect light more than others and some not at all.

You must type each option in the order that they are listed below. Any one or more of them can be left out as they are all optional for this command. Start with a simple "create light" (no quotes) command in an object then add the following options, one by one to see the result:

 

(create, activate, bump or adone) light type=______ color=______ brightness=______ radius=______ name=______ fx=______ time=______ angle=______ pitch=______

 

1. type=_____ specifies the type of light source, which can be either "point" or "spot". "Point" shines equally in all directions and is the default, if you don't use type. "Spot" shines a "cone" of light in a certain direction (so you only really need to use "type" when you want the "spot" function). The "angle" and "pitch" commands focus the "cone" size and direction and are described in step 8 farther down this list.

2. color=_____ specifies the color of the light that shines on surrounding objects and can either be typed as one of the preset word values (green, red, yellow, etc.) or as a "raw" hexadecimal value giving the red/green/blue component values (the same format as used for the "BGCOLOR=______" tag in HTML webpages and color=______ in CNW signs, for example: ff8000 for a medium orange or 008080 for a dark turquoise). The default light color, if you don't use color, is white.

3. brightness=______ specifies the brightness of the light. Brightness is typed as a numerical value where 1 is "normal" brightness and is the the default if you don't use brightness. 2, 3, 4 etc make the light brighter.

4. radius=______ specifies the maximum distance away from the light emitting object that the light shines in meters. Objects beyond this distance from the light will not be lit by the light emitting object. The default, if you don't use radius, is 10 meters. This command is good for keeping the light inside the walls of the room in which they are placed. Reminder: the radius cannot work beyond the maximum value as set in the world options of the world you are building in at the time. To see what the maximum world light distance is: Click Options between View and Show in the top toolbar of your CNW browser then click World then Features and the Max. Light Radius setting is at the very bottom of that settings box.

5. name=______ specifies the name of another nearby object to apply the light command to if the object being clicked or bumped isn't the object you want to emit the light. You have to use "create name ______" on whichever object you choose that will emit the light then use the name you typed in that in the name=______ in the light command. The default, if you don't use name, will be the object that this command is typed into.

6. fx=______ specifies one of several lighting "effects" that can be applied to the light emitting object. All of the effects cause the brightness of the object to vary over time. They are:

fx=blink

causes the light to blink equally between on and off (good for signs and alerting lights)

fx=fadein

causes the light to fade in from dark to full brightness (good for a light-on switch)

fx=fadeout

causes the light to fade out from full brightness to dark (good for a light-off switch)

fx=fire

causes the light to flicker randomly like fire

fx=flicker

causes the light to switch off for a brief period at random intervals (good for fire and also good for creating a "light going bad" effect)

fx=flash

causes the light to switch on for a brief period at random intervals (good for a "disco" effect or to simulate distant lightning flashes thru windows)

fx=pulse

causes the light to fade in and then back out at regular intervals (good for that classic "si fi energy glow" effect)

7. time=______ specifies the interval in seconds for the blink, pulse, fadein, and fadeout effects. It doesn't apply to the other effects. The default, if you don't use time, is 1 second.

8. angle=______ (and pitch=______) control the "type=spot" light command (see step 1. above). angle=______ specifies how wide (in degress) a cone of light emits from the spot. The default, if you don't use angle, is 45 degrees.

9. pitch=______ specifies the angle up from straight down that the spot light points. pitch=0 (straight down) is the default, if you don't use pitch, and the spot of light can rise to straight overhead (pitch=180)