Light flash to simulate lightning?

PL-7764

L6: Sharp Member
Aug 4, 2009
376
84
Is it possible to create a light in a map that would cause an area to become extremely bright for an instant - like when lightning strikes nearby - at random intervals? It doesn't matter too much if it would cause performance issues in a large environment because all I need it for at the moment is an animated menu background I've made (map measures only 1024x1024) which would look oh so much better with lightning flashes to accompany the thunder sounds.
 

Radaka

L420: High Member
May 24, 2009
491
244
I've been thinking about how to do this myself, and the solution that I am going to try is to use extremely bright light_dynamics placed in such a way to make it seem like a lightning flash, then have them flicker on and off at lightning-ish intervals.

A quick side-note: It shouldn't be too much of a performance hit either, as the light_dynamics are only turned on for a fraction of a second.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
You know that light_spots can be turned on/off?

I'm doing it in my map with some light_spots pointing onto the playing field and a logic_timer that fires a thunder ambient_generic and a logic_relay. The logic relay then turns on the spotlight and then with a delay of 0.2 of a second, turns it off again.

I can make a prefab when I finish if you like :p

What I have so far:

[ame="http://www.youtube.com/watch?v=r-QkufCZDfA"]YouTube - TF2 Lightning[/ame]
 
Last edited:

PL-7764

L6: Sharp Member
Aug 4, 2009
376
84
I think I'm gonna try to create a setup using Aly's logic_timer, logic_relay, and ambient_generic and ABS's suggestion of a regular light. I'm not at all familiar with getting entities to interact the way they need to for this though. I may need step-by-step instructions as to how to get it all to interact. :blushing:
 

DasMatze

L2: Junior Member
May 17, 2008
87
31
One thing I don't get after about 1,5 years of mapping for the source engine:
Why use a logic_relay? I think it's only useful when you have multiple entities having the same outputs or if you script something very complex. But in this case it's only the logic_timer. Every output that gets triggered OnTrigger can be triggered OnTimer. That saves a tiny bit of the allowed entitiy data, doesn't it? ;)

DasMatze
 
Last edited:

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
One thing I don't get after about 1,5 years of mapping for the source engine:
Why use a logic_relay? I think it's only useful when you have multiple entities having the same outputs or if you scripting something very complex. But in this case it's only the logic_timer. Every output that gets triggered OnTrigger can be triggered OnTimer. That saves a tiny bit of the allowed entitiy data, doesn't it? ;)

DasMatze

^I always tought the same way. also makes everything much easier to understand (for me at least).

anyways, that css map has some nice lightnings in it, maybe you can give it a look.
[ame="http://www.youtube.com/watch?v=LQWBga69A9w&NR=1"]YouTube - [CS:S] SteamGamers LOTR Escape[/ame]
 
Last edited:

MoonQuake

L3: Member
Jul 18, 2009
111
21
You can use a regular light spot, but make sure the inner and outer cones are wide enough so that once compiled it lights up properly using lightmaps, but also lights up player models when you turn it on and off. You can also set CONSTANT to 1 and QUADRATIC to 0 for a nice constant and evenly distributed lighting effect.

BTW, turning even just 1 light on and off can be very demanding for certain low end computers. The more stuff that is lit by your light(s), the worst it is.