PlaySqueak is called during a timeline, which is ok, because it checks if the audio is already playing and only starts it if not.
Stop squeak is called when the timeline stops.
Usually works fine, but… Under certain circumstances, if I walk up to the door and away again repeatedly, so I trigger the Play and Reverse pins on the timeline a lot in some way, I end up with the sound playing indefinitely.
It wont stop even if I manually call the stop event.
in stop squeak you just stop the sound but it still exists and its not removed so is valid may return something you dont expect (doesn’t really have something to do with logic but fixing this will be better).if I was doing this i would do it this way:
add a sound component to door BP and in settings i feed a sound and i start and stop based on event generated like this.
Have you tried to use a game limiter(a gate with a delay), it should limit the player from spawning thousands of sounds and fixing the problem. Again this doesn’t really fix the main issue but if you can’t replicate the problem after that then there is no problem. ¯\(ツ)/¯
So, strangely, it’s not to do with playing a sound on the timeline, it’s something to do with the fact that I use PlaySoundAtLocation to play the final ‘door closed’ sound.
And what it’s doing is playing the last second of ‘squeak’ audio, followed by one of the random door close sounds, repeatedly. Even though the timeline isn’t running!
And… he shoot, he scores, a home goal. The door close sound was a sound cue with a random node in it. One of the waves being played, sometimes, by that random node had all the door close sounds in it…
How embarrasing.
That’s why it’s always so good to use the phrase “I think it’s a bug”, because you know 10 seconds later, you’ll find out it’s your fault…
Hello!
i was given the following advice at the UNREAL DISCORD by Vik, thanks so much:
you can use these nodes and set the volume to zero. This will, against the common sense,
not mute them but quit them. When you put them above 0.01 again, they will restart.