Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Triggered audio helps reinforce the immersion in our game environment. Theres a mantra, especially in sound editing, see a sound, hear a sound. What that means is we see something we expect to make a sound, then we should hear the sound that goes with it. What I've done so far is to make prefabs for my balcony sound birds and my balcony sound water. I've put them at the corner of the buildings on the balconies. So that, depending on where we are, we hear that water sound when we step outside. For an example, here's balcony sound birds.
And this one's got a max distance on the curve of nine, and minimum distance that's pretty small. So that we're always in the sound zone, essentially, when we step outside. And it fades out to 0 at the end of that range. It's the sound of the lake water and occasionally a bird. It plays on a wake and loops. So that whenever we're on the balcony, we're going to run into this sound. Now get a sound on the doors. What I'm going to do is put the sound actually on the door trigger. So that when we trigger a door to open, we hear this door open sound.
I'll pick my door openers. And I've got five of them in here because I've run around and cloned the door animation. So that every balcony has one operable door. I'll start out with Door 11 and press F to focus in. There's my collider. And I'm going to put on this script and a sound source. I'll scroll down, roll up the Activate Trigger and choose Add Component>Audio>Audio Source. In the audio clip then, pulling the Preview window down in the material. I'll go and find that door open sound.
It's the clipped down one, not the full version door open. I'll let it Play on Awake and it's not a looping sound. I'll make its range just a little bit bigger. Taking down that max distance to, we'll say one and a half, and leaving the min distances at 0.75. So it's a very small zone of audio we're in. I'll turn off Play on Awake and I'm ready to get this sound playing. Now what I'll do is add the script onto the box collider to play that sound. I'll drag my door open sound over, and then I can go choose that particular audio clip.
When I run into the collider, it will trigger that sound and the door will open as well. Play my game. Run over to the door. Trigger it to open and I hear the door and then I'm into the water. Its very common to get previews together of actions in a game and hand off to an audio person. For example, if you're working in a character, get a preview of that character moving, running or whatever the action are, over to your audio person. So they can start to get sound together to match that character. Then, when you trigger that particular animation, trigger the sound as well.
I'll add this same script and sound onto my other door opening box colliders. And that way, whenever I go up to a door, I hear that door open. The weather stripping scraping against the brick patio, for example. And it reinforces what I'm seeing.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 33114 Viewers
94 Video lessons · 22980 Viewers
78 Video lessons · 9338 Viewers
147 Video lessons · 3118 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.