Light flash to simulate lightning?

Discussion in 'Mapping Questions & Discussion' started by PL-7764, Oct 3, 2009.

  1. PL-7764

    PL-7764 L6: Sharp Member

    Messages:
    376
    Positive Ratings:
    67
    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.
     
  2. Radaka

    Radaka L7: Fancy Member

    Messages:
    495
    Positive Ratings:
    242
    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.
     
  3. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,842
    Positive Ratings:
    4,772
    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: Oct 3, 2009
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    I'd say just use a regular light... since you know, lightning illuminates in all directions. (and light_dynamic doesn't work in TF2, btw)
     
  5. PL-7764

    PL-7764 L6: Sharp Member

    Messages:
    376
    Positive Ratings:
    67
    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:
     
  6. DasMatze

    DasMatze L2: Junior Member

    Messages:
    87
    Positive Ratings:
    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
     
    • Thanks Thanks x 1
    Last edited: Oct 3, 2009
  7. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,608
    Positive Ratings:
    1,698
    ^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]
     
    • Thanks Thanks x 1
    Last edited: Oct 3, 2009
  8. MoonQuake

    MoonQuake L3: Member

    Messages:
    111
    Positive Ratings:
    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.