Vlatitude Archive: Rotating Lights Last edited 5 years ago2019-04-25 09:19:47 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
Download example

This tutorial not only shows you how to make rotating lights (like in the Uplink demo), but also how to make those "fire doors" in the game that close when you break the glass. First off, we'll start with making the rotating lights.

The Light

User posted image
The first thing we need to do is make the light fixture. Now comes the hardest part in my opinion. Create two triangular brushes and texture them with the FADE2 or FADE texture. Actually any texture that fades from light to dark should do. You also shouls texture the ends of the brush with a dark texture. Make sure you have the dark section of the texture at the end of the brush like in the picture, because that's where the least amount of light will be. Now make an origin brush in the center of the light then select it and the two other triangular shaped brushes and tie them to the func_rotating entity. The screenshot shows what it should look like.

The Entities

Give the func_rotating entity a name. We also need to change Render Mode to Texture and FX Amount to 0. This causes the entity to start out invisible. There are also a few flags we need to take care of. Check the appropriate rotating direction for your light and make sure Not Solid is checked. If you don't, then the rotating light will push the player if he gets near it and when's the last time you saw a beam of light push someone around? Now place a light entity in front of our rotating brushes. Give it a name and then set it brightness and color. A brightness of 80-100 usually works pretty good here. In the example map, I made the color red. Now go into the flags section and select Initially dark. Now we need to an env_render entity in the level. This will make the func_rotating visible when triggered. Give the env_render entity a name, set its target to the func_rotating entity, set Render Mode to additive, and FX Amount to 75, give or take a few. Also set FX Color to the same color as the light entity.

Adding a siren is also a good idea because it makes the whole event more realistic. Place an ambient_generic entity near the light and give it a name and for Path/filename of wav put ambience/warn3.wav. Make sure the Start Silent flag is checked. Now create a door, give it a name, make sure Starts Open is checked, and set up the other attributes to your liking. Now we're almost done, there's just one entity we need to tie this all together and I bet you can guess which one it is. Yep, that's right, a multi_manager. Have the multi_manager target all of the above entities and for their values, make them all 0. Now just have something trigger the multi_manager. In the example map I used a func_breakable. We could have given all of the entities the same name and then had something target them, but it's much cleaner and more organized to use a multi_manager. Below is a picture of everything in action.
User posted image

More on rotating lights

Don't go overboard on using these lights. Putting a bunch of these in a room can get annoying real quick. Not only that, it can cause a performance hit.
This article was originally published on 69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.