Sound gets distorted in play mode?

Hi! I’m a total beginner learning to use UE4.
I came across this problem. When I add a door opening sound on my door blueprint, the sound gets distorted in test play. Doesn’t matter if the sound is UE4’s own or a sound I downloaded. In the preview the sound works but when added and tested it sounds awful.

Doesn’t seem to matter whether the sound is cue or not cue, and to be honest, i don’t even know the difference yet!

I do have multiple doors on my level and 3 differently opening blueprints for them. I’ve checked that the triggers aren’t on top of each other so they shouldn’t play the sound from multiple doors at once. Also, the Play sound at location node is targeted to the door itself, and not the opening trigger.

I have a door opening switch blueprint with a sound too and there the sound works perfectly.

Can you show your blueprint. I deeply suspect you are playing the sound many times overlapping.

Using tick perhaps, or playing the sound on the timeline…? :wink:

Also try an empty level and put just 1 door in there, to make sure the others are not firing.

1 Like

is an ss of the blueprint. I know it’s probably totally wrong but I have no idea where else to add the Play sound node. :smiley: If i add it separately with a new “On component begin overlap” it’ll play all the time tho the door is locked. So do i have to build a whole new set of nodes for the sound only?

It’s like I thought, you need to put it here:

This will only work for opening of course. Is it for closing too?

OMG! Thanks so much, it works now! I put the same sound to closing too and it sounds perfect. Feeling kinda stupid I didn’t realize this myself. :smiley:
Awesome, thanks again!

Hey, no problemo.

Looking at your code, maybe I see a loophole, what if you walk up to the door, and then away again before it has finished opening?

If that is a problem, tell me what kind of sound you’re using ( a long creak, or does it have a thump on the end etc ), and I’ll show you how to fix that… :slight_smile:

EDIT: Just in case it wasn’t clear, the UPDATE pin of a timeline runs every frame, that’s why it sounded bad.

Hey! Yeah, the sound does loop weirdly, if the player just walks past a door trigger or sth. The sound is sort of door sliding with a thump at the end. It fits for closing too, but when walked past the door the thump sound is heard twice. If it’s not too much, i’d like to learn how to fix that, thanks so much! :slight_smile:

Oh, ok. Still not sure what everything means but i learn best by trying and doing. :slight_smile: So I tried the FINISHED pin and the door just sort of… Disappears in the frame. Update means it shows every frame of the door opening, finished means it jumps from first frame to last? Is that so? :smiley:

I’ll show you how to manage ‘early player walkoffs’, but that will be a bit later today ( have an appointment ).

Finished pin is no good, the sound will play after every has happened :slight_smile:

The point is, that that UPDATE pin of the timeline is called every frame ( 120 per second ), that’s why your sound was weird, there were thousands of them player…

Ok, this is the basic way of getting around it

Things get more complicated again, if you have one open sound and one close sound. And then more again, if you specifically want the behaviour below:

Player walks up to door, moment the door starts to open, player walks away again, then only play the last part of the sound ( with the bump ).

Also ( we’re getting there… ), spawn/play sound at location actually have no effect unless the sound you’re using has attenuation settings:

344645-screenshot-2.jpg

If you don’t have that, no matter how far away you get, it is still playing in your ear.

PS: Another way of avoiding the sound problem, is to always play the full animation before stopping.

Yikes, I tried to do that but i can’t make a Play Sound node with a target like in your example? Told you, I’m a total beginner so I have no idea where else to find nodes than pulling the menu from a previous node. :smiley:

Play sound it just a custom event. Right click and look for ‘custom event’.

( You have to make the play sound custom event, before you can call it… )

Ok, now i did all that as in your example. But the sound just plays immediately when i press play, so… i’m supposed to make attatch it to the event when the player walks in the door trigger - but how? Oh gosh, I’m sorry i’m so dumb! :smiley:

So you already had the overlap code, right? Once you’ve made the play and stop sound custom events, they have called here

( it’s in the pic above ).

Yeah, I’ve done that exactly like that. But still the sound spawns immediately when play mode starts, and doesn’t hear when walking to the door! :smiley: Well, maybe I’ll figure it out as I go… There’s probably something i just don’t know yet…

The pic I did at the top, shows the whole thing, you don’t need any more code. It won’t do anything on begin play…