Spinning Lights

Tutorial collection, comprehensive listings on main site.

Spinning Lights

Postby Tutorial on Mon Mar 07, 2005 5:57 pm

category
General Half-Life 2/Lighting

description
Somewhat similar to an emergency light or the effect of a police car light.

keywords
light, lights, spin, spinning, func_rotating.

This tutorial will show you how to make those cool spinning lights you see in action movies or on police cars.

Anyway, here's how to do them:

First you will need something for these lights to move with, so create a brush. I just made an invisible rectangle but you can make some kind of light fixture if you like.

Image

Change this brush to an entity (ctrl+T) and change it to a func_rotating. Set up the following properties.

Name: int1
Speed: Up to yourself
Start ON: Unless you want it triggered
X/Y/Z axis

Now we're ready to add the lights!

Create two 'Point_Spotlight' entities and move them to either side of the 'func_rotating'. Now give each of the lights a parent, make sure this is what you named the spinning block. Now make sure they are both facing the correct direction.

Image

Here's what they look like in game:

Example Clip (356k WMV)

Bilko
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby devil_dog on Wed Nov 23, 2005 1:19 am

Very cool. I think I have a nice use for this. I have a simple arena map that has a bomb plant site in the middle of the map. I think it would be cool to trigger this light to flash when the bomb has been planted.

Can you tell me how to trigger the light with the placement of the bomb?
dd
devil_dog
Regular
Regular
 
Joined: Wed Nov 23, 2005 1:17 am

Postby slayera on Wed Nov 23, 2005 8:28 am

I don't think a bomb can trigger anything, but you can place a trigger around the bomb site and use a filter to trigger only when a T enters the bomb site.
Image


"When one person suffers from a delusion it is called insanity. When many people suffer from a delusion it is called religion." -Robert Pirsig
User avatar
slayera
Veteran
Veteran
 
Joined: Wed Dec 08, 2004 3:15 am
Location: Near the world's only super volcano.

Postby Avenged7Fold on Wed Nov 23, 2005 6:27 pm

im confused....my lights show up but dont move....the X Y Z thing is the only part I dont get
Avenged7Fold
Regular
Regular
 
Joined: Tue Nov 15, 2005 1:17 pm
Location: Ohio

Postby devil_dog on Thu Nov 24, 2005 12:45 am

Well, mine isn't working at all. Doesn't even show up in the map.

I can't find the property that you use to set the Start property.

I made an invisible rectangle and made it an entity as described. After I set the other properties I created 2 point_spotlight entities and placed then on opposite sides like desribed. When I render the map and play it, nothing shows up at all.

dd
dd
devil_dog
Regular
Regular
 
Joined: Wed Nov 23, 2005 1:17 am

Postby devil_dog on Thu Nov 24, 2005 1:23 am

Ok, found the start property under the flag tab. Now I have lights that rotate, but they are all over the place. It's like they aren't spinning on center axis of the rotate brush.

What were the values of you pitch yaw roll on your spotlight entities.

dd
dd
devil_dog
Regular
Regular
 
Joined: Wed Nov 23, 2005 1:17 am

Postby devil_dog on Thu Nov 24, 2005 2:20 am

Ok, I think I solved this. I found it easier to build this spinning light in an open space on the map, then move it to the location I wanted after it tested good.

I found some helpful stuff on another tutorial for a Lighthouse.

http://www.akilling.org/akg/tutorials/w ... thouse.asp

The things I found that were important is to not set any pitch yaw roll properties for the rotating brush. The pitch yaw roll properties for the spotlights should be 15 170 0 and 19 358 0 for a slightly angled down light. I also liked having the rotation speed at about 300 for this type of light.

dd
dd
devil_dog
Regular
Regular
 
Joined: Wed Nov 23, 2005 1:17 am

Postby Puppet_That_Kills on Thu Nov 24, 2005 3:42 am

I don't like this method. Having a box that sits there spinning in a circle is ugly. You'd be better off placing a model, building a nowdraw box arround it, and then make it into a func_rotating with the same settings and parented lighr entities. It'll look much more professional.

Puppet
Image
User avatar
Puppet_That_Kills
Pheropod
Pheropod
 
Joined: Thu May 05, 2005 10:48 am
Location: Toronto Ont.

Postby Avenged7Fold on Thu Nov 24, 2005 4:01 am

where do we find light models of this type?
Avenged7Fold
Regular
Regular
 
Joined: Tue Nov 15, 2005 1:17 pm
Location: Ohio

Postby devil_dog on Thu Nov 24, 2005 6:33 am

Well, get it working first, then pretty it up.

I'll play with models instead of the rectangle when I have more time. I'm just happy to have the light working like I wanted.

Now, I really really want the light to only come on when the bomb has been planted. Anyone know how to make that happen?

Also, I want to reduce the damage the bomb does. My map is small and everyone dies when the bomb goes off.
dd
devil_dog
Regular
Regular
 
Joined: Wed Nov 23, 2005 1:17 am

Postby Sauce on Mon Nov 28, 2005 3:23 am

How can I make it brighter? I changed the length setting to see if I could get it to project further but I had no luck, I think it's just too God-damned pale!
Image
Blink wrote:Do you watch porn and decide you don't need to have sex because you've seen the ending? :-D

zombie@computer wrote:what retarded countries measure in stones anyway?
or feet? or inches? Your dick is a lot longer in cms
User avatar
Sauce
Senior Member
Senior Member
 
Joined: Sat Nov 26, 2005 4:36 am
Location: Australia

Postby Sauce on Mon Nov 28, 2005 3:24 am

How can I make it brighter? I changed the length setting to see if I could get it to project further but I had no luck, I think it's just too God-damned pale!
Image
Blink wrote:Do you watch porn and decide you don't need to have sex because you've seen the ending? :-D

zombie@computer wrote:what retarded countries measure in stones anyway?
or feet? or inches? Your dick is a lot longer in cms
User avatar
Sauce
Senior Member
Senior Member
 
Joined: Sat Nov 26, 2005 4:36 am
Location: Australia

Postby verballydecapitating on Mon Nov 28, 2005 4:55 am

Make sure that r_dynamic is 1, or dynamic lights will do nothing (except light up models I think).
Image
verballydecapitating
1337 p0st3r
1337 p0st3r
 
Joined: Tue Apr 26, 2005 1:09 pm
Location: New Zealand

Postby devil_dog on Mon Nov 28, 2005 2:36 pm

I ended up adding a model of a red cage light and made the rotating brush a nodraw. It looks a lot better like this.

dd
dd
devil_dog
Regular
Regular
 
Joined: Wed Nov 23, 2005 1:17 am

Postby quezako on Thu Jan 19, 2006 10:05 pm

I've got one question:

How the hell do you manage to have red lightspot beams??
I tried but my beam remain white.
Can you post a the .vmf file?

Is it working wit CS Source?

If anyone know how he did it, please tell me.
quezako
Member
Member
 
Joined: Fri Feb 04, 2005 11:52 pm
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users