I love the smell of UnrealEd crashing in the morning. – tarquin

Difference between revisions of "Legacy:Triggering Sounds"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(revert)
 
m (+internal link)
 
Line 11: Line 11:
 
==TriggeredAmbientSound ==
 
==TriggeredAmbientSound ==
  
[[Legacy:TriggeredAmbientSound|TriggeredAmbientSound]] works, but only if bStatic under [[Legacy:Actor (UT)/Advanced|Actor (UT)/Advanced]] is manually set to False. There's also YoMammy's custom script on that page, which fixes all of the problems with TAS.
+
[[Legacy:TriggeredAmbientSound|TriggeredAmbientSound]] works, but only if bStatic under [[Legacy:Actor (UT)/Advanced|Actor (UT)/Advanced]] is manually set to False. There's also [[Legacy:TriggeredAmbientSound#YoMammy:_.2804.2F11.2F2002.29|YoMammy's custom script]] on that page, which fixes all of the problems with TAS.
  
 
==TriggerLight ==
 
==TriggerLight ==

Latest revision as of 18:21, 29 September 2015

In UT, there are several methods used to have sounds in a map that can be triggered. (Nobody has taken the time to write about it for UT2003 yet!)

For one-shot sounds, the best method is probably the SpecialEvent actor, although it doesn't allow volume control. For looping sounds, things are a little more complicated: the problem is making the sound stop.

The methods are:

DynamicAmbientSound[edit]

DynamicAmbientSound (description needed)

TriggeredAmbientSound[edit]

TriggeredAmbientSound works, but only if bStatic under Actor (UT)/Advanced is manually set to False. There's also YoMammy's custom script on that page, which fixes all of the problems with TAS.

TriggerLight[edit]

TriggerLight can be set so a sound is heard when activated, but no light is produced. This works fine with looping sounds.

Set the following properties:

  • Lighting -> LightBrightness to a non-zero number. This will set the maximum volume for the sound
  • Lighting -> LightType to LT_Steady
  • Lighting -> LightRadius to 0 – this is so the light doesn't show
  • Object -> InitialState – Choose a triggering type. See the TriggerLight class page for the list & details

Advantages:

  • can be set to stop. This means a looping sound can be used.
  • the sound can be made to fade up or down gradually in the same way that TriggerLight can make the light fade.
  • the maximum volume can be set with LightBrightness

To make a looping sound play for a set time and then stop, set the TriggerLight's Object.Initial state to "TriggerToggles", and trigger a Dispatcher which in turn triggers the TriggerLight twice – see Trigger Systems for a full explanation of this technique.

SpecialEvent[edit]

A SpecialEvent actor can be used to play a sound. Drawbacks to this method:

  • only one-shot sounds work with this; looping sounds will play continually until the player moves out of range of the SpecialEvent.
  • the volume can't be specified directly; the sound will play at maximum volume unless you set the TransientSoundVolume property of the SpecialEvent to a value between 0.000 and 1.000. See Actor (UT)/Sound for more info.
  • If you forget to set the Object -> InitialState property it will take you bloody ages to work out what you've missed.

Hidden Mover[edit]

This is a dirty trick and best seen in DM-Pressure: the hissing sound made by the pressure chamber is make by two simple cube movers that move in solid space nearby. Their mover sounds provide the noises.

  • Advantage: you get not just one sound, but with OpeningSound and OpenedSound you can set start and end sounds. See Mover for more on this.
  • Drawback: you can't set the volume of these extra sounds; they're played at maximum.
  • Drawback: it's messy

Related Topics[edit]