- This is a beginner-level tutorial on how to create audio objects.
- Open HeroBlade, log into a test area (it is not a good idea to experiment in production areas)
- Make sure audio objects are visible and selectable by clicking on the word "Audio" in the Visibility Menu and Selection Menu if there is no check mark next to the word "Audio"
- Open the Create menu, choose Audio and then Load Audio
- Select the sound file located at HE/Engine/CleanGame/Audio/audio_tutorial.fev
- Click OK
- Create an instance of the new audio asset:
- Open the Assets panel
- Locate the sound file. If the audio file is an SGT or WAV it can be found in the "Audio" section, if it is an FEV it can be found in the "FMODEvent" section
- Right-click on the file and select "New Instance"
- The word "FMOD" should appear in the world. This it the FMOD Event instance
- In the properties panel change the EventPath to example/laser and the sound should play
- To temporarily turn off the sound, click on the speaker icon in the HeroBlade toolbar
Modifying the audio properties
Note: These properties only exist for SGT sound nodes.
With the audio object selected, in the Properties panel, modify the following:
- Change MinDistance to .9
- The MinDistance marks the distance from the object at which the sound will be playing at maximum volume. For example, if dealing with a generator hum, the hum will be the same (maximum) volume whether you are standing on top of it or a few feet away. Then after the "MinDistance" threshhold, the sound volume will begin decreasing with distance.
- Change MaxDistance to 5
- The MaxDistance marks how far away that the sound volume will stop decreasing. Between the MinDistance and MaxDistance, the volume will decrease along a curve.
- Change CutoffDistance to 10
- The CutoffDistance marks how far away that the sound, at minimum volume, can be heard at all.
- Change AmbientType from OMNI to DIRECTIONAL
- The MinDistance, MaxDistance, and CutoffDistance properties will still work, but now they are only operative within a code of sound.
With DIRECTIONAL audio objects, the shape of the cone can also be modified:
- InnerAngle: Within the InnerAngle, the sound will be at maximum volume
- OuterAngle: Between the InnerAngle and OuterAngle, the sound will drop off from Maximum to Minimum volume
- VolumeOutsideCones: The level of volume within the outside cone.
Other audio properties:
- Stopped: Controls the playing of the entire sound
- Paused: Pauses the sound at its current point of play
- StartOffset: In seconds, how far into the sound file to start playing
- FadeInLength: In seconds, how long to bring the sound up to volume
- FadeOutLength: In seconds, how long to fade the sound out