TLDR: How do I set up a fast firing gun in UE4 w/ fmod without it stuttering?
Currently having major issues with trying to implement my AK47 gun sound into UE4 with fmod.
Right now I have had my programmer set up our AK47 gun to do time between shots for the fire rate and have an event that triggers the gunshots with left mouse pressed down. So basically your typical automatic gun fire. The issue is that the audio isnt consistent with the fire rate 1:1.
Recorded example of audio:
The print string we set up shows the fire is consistant physically but with fmod, but the audio seems to stutter and isnt 1:1. Any idea why this is happening. I’ve also included a short video to kind of show you what i mean. If you skip to 1min in you can hear the gun fire:
Thanks in advance, really looking forward to getting some help on this as its driving me nuts lol
Problem is being able to stop that loop in UE4 with release of mouse button one, fmod doesnt even have a simple “stop event sound” and event instance stop doesnt seem to work. http://imgur.com/a/vx42G my bp
We have the fmod fire sound set to a loop inside fmod studio. If you look at the bp screenshot i posted, that’s how we have it setup, the loop just continues to play though after 1 mouse click http://imgur.com/a/vx42G
Cameron, we have done this, we are using a mixture of C++ and Blueprint, so the Fire Audio Trigger calls on Left Mouse Down and Stop Fire runs on Release, both in the Player Controller. Even with your BP duplicated in the blueprint FirstPersonCharacter we have the same issue.
Ah yes, I didn’t anticipate that.
I would probably suggest using a parameter and trigger condition on the loop. Then instead of telling the event to stop, you change the parameter to allow the sound to play out but end the loop. Then the sound will produce no noise and remove itself. http://imgur.com/nDU7dEF http://imgur.com/pFmvKaL
I’m assuming when you say it triggers on Left Mouse Down, its only the first frame the button is down and not repeated while the button is held down.
It sounds like there are multiple looped instances being played then when you release only the last will be stopped because you aren’t keeping a reference to them all.
You can verify this using Studio and Live Update to track the number of events being played.
In Studio, you shouldn’t need another sound in the loop parameter otherwise it will play an additional sound when that parameter value is set. The parameter should just turn the loop region on and off on the main sound.
If you have set it up that way on purpose then ignore this comment.