I downloaded some tracks on youtube as music for my game (I got permission to do so). When the music is playing and I quickly spam crouch (“s” button) while shooting projectiles (“left mouse” button) it seems this audio resets and plays from the beginning.
To me I don’t see the relation between the keyboard input and the audio resetting. If anyone else has encountered this can you explain what is happening? Thanks so much!
I tried this and thought it worked until I spammed the buttons harder: (Before importing the file, I need to go to the properties for the file and check the file as “Read-only.”)
I’m definitely using 4.10.4. I tried migrating to a newer version of the engine and the widgets/code was breaking. I just tested in 4.14.4 and the issue is still occurring also.
I don’t think showing the images of the blueprint is too helpful as I am not accessing any sound components with shooting (I don’t want to show too much of this blueprint).
Sometimes it helps to come back to the code the next day with a clear head.
What I think is going on is there can only be a limited number of sounds going off at once. For example, if I shoot 100 bullets in 10 seconds some of the sounds are going to be cut out even if the sound is in another blueprint. By making the sound of my bullet part of my component rather than being called in the “play sound 2d” method, it seems like the issue was fixed: