Roving Spotlight?

  • If you're asking a question make sure to set the thread type to be a question!

FlavorRage

L4: Comfortable Member
Oct 12, 2008
197
57
Hi! I'm working on a nighttime urban KOTH map and I have a skybox with lots of skyscrapers. I would like to have some roving spotlights in the background moving around the towers. How would I got about doing this? A particle effect? How would I make it move? Thanks for any and all help. :)
 

FlavorRage

L4: Comfortable Member
Oct 12, 2008
197
57
Assuming you mean for the light to rotate in a circle, theatre/L4D style:

You can probably make a point_spotlight and parent it to a momentary_rot_button (func_rotating is broken in tf2).

Seems simple enough. Any idea how I might get it to go back and forth from two points, pausing at each end? I'll do rotating if I can't manage the other.
 

Cynick

L4: Comfortable Member
Feb 7, 2010
153
284
Do you mean the entire light moving? Or just the beam changing it's direction?

For the first one you could use a func_movelinear, and set up it's outputs like this: (assuming you want it to pause for 2 seconds):

OnFullyClosed | !self | Open | <nothing> | (Delay)2
OnFullyOpen | !self | Close | <nothing> | (Delay)2
 
Last edited:

Tehrasha

L3: Member
Nov 5, 2009
115
28
The func_rotating is fixed in the FGD pack, isn't it?

func_rotating will rotate the brush only.
When you attempt to parent something to it it stops rotating.

Thus, the momentary_rot_button hack. (which works very)
 

Tehrasha

L3: Member
Nov 5, 2009
115
28
Come on man, I keep saying it every month it seems. :( I can't actually change anything about how entities work. That's all in the code, the FGD merely tells Hammer what to display.

Still, its major bonus points that your resource pak makes things so much easier to do, that it can be mistaken for increased functionality. :)
 

Cynick

L4: Comfortable Member
Feb 7, 2010
153
284
Ironically, Valve has a func_rotating in the skybox of 2fort intended to make the clouds rotate (but of course they don't because func_rotating doesn't work right). However, when the map is booted in Garry's mod, the clouds suddenly start rotating because func_rotating works in Gmod :O
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Ironically, Valve has a func_rotating in the skybox of 2fort intended to make the clouds rotate
I got a little laugh out of that too. (Before replacing it with a physics motor.)

I also had some promising results at replacing the rotating clouds with a special particle system which would quickly emit and spin-randomize the clouds before settling into a steady state.
 

Tapp

L10: Glamorous Member
Jan 26, 2009
776
215
Yup. Radar dish on top of Point B in cp_gravelpit is supposed to rotate too.

Could this be a sign that valve plans on fixing func_rotating? Or maybe its just a reminder that most of the mappers prefer goldsrc (like the func_illusionaries used in l4d, which the entity description says should be a func_brush).