Playing sounds
When playing audio, we have to differentiate between dynamic sounds triggered by the programmer, and static sounds that are triggered by the level creator.
There are multiple ways of triggering audio events, which should be evaluated based on the purpose of the sound.
Using SoundSpots
The soundspot entity exists to allow level designers to easily place an entity that will play a predefined sound in a specific area. The sound entity supports looping sounds, or playing them once each time it is triggered from a scripted event.
To use a soundspot, start by placing a new instance of the SoundSpot entity via the Rollupbar, or navigate to Sound | Soundspot. Once placed, you should see something similar to the example shown in following screenshot:
We can now assign a sound that should be played within the spot. To do so, click on the Source entity property and then choose a sound via the Sound Browser window as shown in the following screenshot:
You can then set up SoundSpot to either...