Always snap to grid

Legacy:Lightning Storm

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Introduction[edit]

Since I'm working on a level which has a Lightning Storm in it, I thought I might as well add a tutorial about it here ;)

The first basic setup came from 'Master Builder', one of the best mappers I know. Though he doesn't often release a level :/

The basic idea is quite easy, but adding the final touches and configuring it all 'just' right, can take a bit of time. But don't worry, I'll tell you exactly how I did it in my level.

For the Lightning Storm you'll need to add several new actors to your level. Depending on how 'real' you want it to be, you may discard a few of these actors. I'm assuming you know the basics of all of these actors – you may want to browse the class spec pages before you start.

  • StochasticTrigger: These are the start of it all and will control the whole Storm.
  • TriggerLight: These are going to be used to add visible Lightning to the level.
  • SpecialEvent: Will be used to play sounds which all players hear.
  • Dispatcher: Will trigger a chain of events (for example: lightning-sound, followed by visual lightning, followed by another sound,...).

Let's get to work[edit]

TriggerLights[edit]

Add a TriggerLight in your skybox, where you want the lightning to originate from. Also add one or more TriggerLights in the actual level. These should be put in at such a position that they are at the 'same' position as the one in the skybox. In my own level I added two TriggerLights (one right under the other), because it's a rather large outside area and only one TriggerLight didn't quite gave the desired Lightning flashes.

Once placed in the level, open their properties and make sure these settings are as stated.

  • Lightcolor:
    • LightBrightness: 128-254
    • LightHue: 0
    • LightSaturation: 255
  • Lighting:
    • LightEffect: LE_Cylinder
    • LightRadius: 254
  • Object:
    • InitialState: TriggerToggle
  • Triggerlight:
    • bDelayFullOn: False
    • bInitiallyOn: False
    • ChangeTime: 0.00000000
    • RemainOnTime: 0.50000000

Also give all TriggerLights the same tag (for example: Lightning :)).

SpecialEvents[edit]

I added 7 SpecialEvents to my level. All of them have InitialState set to PlayersPlaySoundEffect. Below you can find exactly how I configured all of these SpecialEvents. But the bottom line is that 4 of them will have LightningSounds and the 3 final ones will have ThunderSounds.

Note: The naming I used for the Tag's aren't the best ones :(

  • SpecialEvent 1:
    • Events:
      • Tag: Thunder0
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.lightn2a'
  • SpecialEvent 2:
    • Events:
      • Tag: Thunder1
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.lightn3a'
  • SpecialEvent 3:
    • Events:
      • Tag: Thunder2
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.lightn4a'
  • SpecialEvent 4:
    • Events:
      • Tag: Thunder3
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.lightn1a'
  • SpecialEvent 5:
    • Events:
      • Tag: Atmos_Thunder1 (see why my naming ain't the best ;))
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.thund1'
  • SpecialEvent 6:
    • Events:
      • Tag: Atmos_Thunder2
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.thunder'
  • SpecialEvent 7:
    • Events:
      • Tag: Atmos_Thunder3
    • SpecialEvent:
      • Sound: Sound'AmbOutside.OneShot.thunder4'

Dispatchers[edit]

I added 4 Dispatchers to my level.

  • Dispatcher1:
    • Dispatcher:
      • OutDelays:
        • [0]: 0.0000000
      • OutEvents:
        • [0]: Thunder0
    • Events:
      • Tag: atmosphere0
  • Dispatcher2:
    • Dispatcher:
      • OutDelays:
        • [0]: 0.0000000
        • [1]: 0.0000000
      • OutEvents:
        • [0]: Thunder2
        • [1]: Thunder1
    • Events:
      • Tag: atmosphere1
  • Dispatcher3:
    • Dispatcher:
      • OutDelays:
        • [0]: 0.0000000
        • [1]: 0.0000000
        • [2]: 0.0000000
      • OutEvents:
        • [0]: Lightning
        • [1]: Lightning
        • [2]: Thunder2
    • Events:
      • Tag: atmosphere2
  • Dispatcher4:
    • Dispatcher:
      • OutDelays:
        • [0]: 0.0000000
        • [1]: 0.0000000
        • [2]: 0.0000000
        • [3]: 0.0000000
        • [4]: 0.0000000
        • [5]: 0.0000000
      • OutEvents:
        • [0]: Lightning
        • [1]: Lightning
        • [2]: Thunder3
        • [3]: Lightning
        • [4]: Lightning
        • [5]: Thunder3
    • Events:
      • Tag: atmosphere3

StochasticTriggers[edit]

Now to put it all in motion :D

In my level, I used two StochasticTriggers. The first one is the one causing the LightningSounds and Lightning, while the second one causes a more general rumbling in the background (ThunderSounds with lower volumes). You are free to combine these two StochasticTriggers into one if you want to ;)

Anyway, so add two StochasticTriggers to your level. They can be anywhere in the level.

Make sure both StochasticTriggers have AlwaysActive as InitialState!

  • StochasticTrigger1 (Thunder)
    • Events: (here go the SpecialEvents with Thundersounds)
      • [0]: Atmos_Thunder1
      • [1]: Atmos_Thunder2
      • [2]: Atmos_Thunder3
    • maxRecheckTime: 10.0000000
    • minRecheckTime: 2.0000000
    • triggerProbability: 5.0000000
  • StochasticTrigger2 (Lightning)
    • Events: (here go the Dispatchers for the Lightning Effects)
      • [0]: atmosphere0
      • [1]: atmosphere1
      • [2]: atmosphere2
      • [3]: atmosphere3
    • maxRecheckTime: 30.0000000
    • minRecheckTime: 5.0000000
    • triggerProbability: 5.0000000

Conclusion[edit]

You're basically done :) Boot your level and enjoy a rather scary Lightning Storm.

This is just how I did the lightning in my level. You are free to experiment with it, adding more Dispatchers (for more diverse LightningEffects), changing LightningSounds and ThunderSounds,...

Notes[edit]

I did notice that with all these SpecialEvents etc, the Voice Taunts from UT sometimes get cut off :/ Probably this is caused by UT not having enough channels for sound or so. I don't know.

Comments[edit]

Place your comments on this tutorial here :).

The sound problem is caused by the ClientPlaySound method used in the PlayersPlaySoundEffect state of the SpecialEvents. This overrides the taunting sounds which are played through the same method.
Maybe another kind of triggerable sound effect could solve this problem? – Wormbo
Ah, but what other triggerable (and working) sound effect actors are there? I tried sumtin called TriggeredAmbientSound, but it doesn't seem to work :( – the G.o.a.T
Look at Triggering Sounds, that explains the various methods. – Tarquin
The TriggeredAmbientSounds seem to work, but I don't see a way to implement this storm with those. Because the SpecialEvents Initialstate makes sure all players hear the sound, while this one is only in the actor's radius. Guess the SpecialEvents have to stay then ;) – the G.o.a.T
I guess the easy way to solve this would be to make the TriggeredAmbientSound's radius enclose your entire map. – 2D.Cube

Related Topics[edit]