This article was recovered from an archive and needs to be reviewed

The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted

Some information may be out of date as it was written before Half-Life was available on Steam

After the article is re-formatted and updated for Steam HL, remove this notice

Please do not remove the archive notice from the bottom of the article.

Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Introduction

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).

rotlight1.jpg

Setup

The first thing to do is... build the light, of course. Below is a closer look at the rotating light objects.

rotlight2.jpg

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.

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) Start Silent ( 16 ) - Set this flag so the sound is silent until triggered.

Coordination

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.

Now, all you need to do is activate the light1_mm multi_manager to turn on the rotating light.

rotlight3.jpg

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.

Example

For a more concrete illustration, check out the example map linked below.

This article was originally published on the Valve Editing Resource Collective (VERC).TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.