There were various places in Half-Life (and in the Half-Life Uplink demo, from which the picture below was taken) where there are various forms of what appear to be rotating lights. This effect is a combination of a few diffent entities- a func_rotating (the visible light "beams"), a light entity (for the actual light given off), and an env_render (which makes the rotating light beams visible when the effect is triggered).
The first thing to do is... build the light, of course. Below is a closer look at the rotating light objects. In the picture above, the light fixture is a normal world brush (there is a 1 unit wide func_wall between it and the wall to prevent unnecessary brush splitting). The three objects labeled func_rotating all belong to one func_rotating entity.
The func_rotating entity
The setup of this entity is fairly straightforward. Below are the essential properties you'll need to set. Something that should be kept in mind is that an origin brush (the green and white part of the func_rotating in the picture above) needs to be a part of the rotating entity.
- Name (targetname) - give this a value of light1_rot (for this example). Triggering this name will cause the func_rotating to toggle between on and off.
- Render Mode (rendermode) - Set this to Texture (2).
- FX Amount (renderamt) - Set this to 0. This, combined with the above Render Mode setting will make the func_rotating start out invisible.
- Rotation Speed (speed) - Set this to a high number, like 250 or 300.
- (Flags properties) X Axis or Y Axis (4 or 8) - Setting one of these flags determines what axis the rotating object will spin around. The easiest way to determine which flag you need to set is find the rotating object in the 2D views, and click in the 2D view that the rotating object would theoretically be rotating in. In the Worldcraft toolbar, one of the 2D View buttons will become selected - XY, YZ, or XZ. The flag that you need to set is the axis that is missing from the selected view. For example, if the selected view is the XZ view, you should set the Y Axis flag. If the selected 2D view is the XY view, then you don't need to enable either flag as the entity defaults to rotating on the Z Axis.
- (Flags properties) Not Solid (64) - This flag needs to be set. Otherwise the rotating beam of light is going to knock the player around.
The most complicated thing about this func_rotating entity will be texturing it correctly. As you can see from the picture above, it's a yellow texture that fades to black. There are two different textures you can use for this: FADE and FADE2. You will more than likely need to scale the texture down a bit (and give the textures for the upper beam a negative Y scale to flip it around the right way) using the texture application tool (Shift+A). Also, using the texture application tool, you'll neeed to apply the BLACK texture to the top and bottom of the beams.
The light entity
Next we'll add in the light entity. Ok, honest this time, this one really is straightforward. It should be placed just in front of the func_rotating object.
- Name (targetname) - for this example, set this to light1_light. triggering this name will toggle the light on and off.
- Brightness (_light) - this is just a suggest color and brightness, but you can set this to 255 255 0 100 which is a pure yellow at 100 brightness.
- (Flags properties) Initially Dark (1) - set this flag to make the light start off.
The ambient_generic entity
This is just an extra. A common use for these lights is to signal an emergency event, and typically an alarm sound would accompany them. Place the ambient_generic wherever you'd like the alarm sound to come from, and set it up with the following properties.
- Name (targetname) - for this example, set this to light1_sound. Triggering this name will toggle the sound on and off.
- Path/filname.wav of WAV (message) - set this to ambience/bigwarning.wav - its just a good alarm sound. If you've got another sound in mind, use that.
- Volume (health) - I prefer a rather low volume for my alarms, say 4 or so. It really depends on how long the player is going to be in the alarm environment. More than a minute of loud obnoxious alarm sounds can really become irritating.
- (Flags properties) * Radius (1, 2, 4, and 8) - Choose the radius you'd prefer here.
- (Flags properties) Start Silent (16) - Set this flag so the sound is silent until triggered.
Ok, so now we have a light beam that's invisible, a light that is dark, and a sound that is silent. Useful. Sounds like some ancient riddle.
To get the events rolling, we'll use a multi_manager to coordinate everything. First, we need to setup an env_render to make the light beams visible when everything gets triggered.
The env_render entity
This is pretty simple to setup.
- Name (targetname) - for this example, set this to light1_rot_on
- Target (target) - set this to light1_rot. When this entity is triggered, its rendering effects will be applied to any entity with the light1_rot name, which in this case is the rotating beams of light.
- Render Mode (rendermode) - Set this to Additive (5). This gives the light beam a slightly opaque bright look.
- FX Amount (renderfx) - Set this to about 75. You want a fairly low brightness for this, to give the appearance of an intangible beam of light.
Now that we have the final piece of the puzzle, its time to coordinate everything. Place a multi_manager in your level and use the following properties.
- Name (targetname) - for this example, set this to light1_mm
The rest of these key values have to be added manually, by turning off SmartEdit mode in the multi_manager properties, then clicking on the Add button.
- light1_rot_on, 0 - This activates the env_render entity, rendering the light beams visible.
- light1_rot, 0 - This activates the func_rotating entity, causing it to start spinning.
- light1_light, 0 - This activates the light entity, turning it on.
- light1_sound, 0 - This activates the ambient_generic entity, turning on the alarm sound.
Now, all you need to do is activate the light1_mm multi_manager to turn on the rotating light. As shown in the picture above, there is a func_breakable which, when broken, triggers the multi_manager which starts the course of events. This can be alternately handled many different ways - a trigger the player walks through, a button a player or monster activates, a trigger_auto that activates it after a certain time, etc etc. If you need a map to disect, refer to the example map below.
For a more concrete illustration, check out the example map linked below.