0
0

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:
enter image description here
fullscreen ss

We’re using a single audio file and not a loop for consistancy.
Here’s what the basic bp looks like:
enter image description here
fullscreen ss

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:
https://www.youtube.com/watch?v=W714hZM6exA&feature=youtu.be

Thanks in advance, really looking forward to getting some help on this as its driving me nuts lol :)

  • You must to post comments
0
0

Generally using a looped event would be best for this, but you could also use a scatter sound without all the 3D area attributes.

When creating and playing multiple events, it can be difficult to guarantee the accuracy at which they are played. There are a few things you can do to help though.

Make sure banks are loaded well before hand, as well as the sample data, and not using streamed files for short quick events.

  • Coby Jennings

    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.

    We are both very stumped

  • Matthew Centonze

    4.15.1 & 1.09.03

  • Matthew Centonze

    Some progress here: Problem 1 solved with removing all release on AHDR but now if i press the left mouse quickly for 1 shot, it doesnt play the entire clip through for a single gun shot.

  • Cameron Baron

    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.

    View post on imgur.com

    View post on imgur.com

  • Matthew Centonze

    It’s odd because I have it set up exactly as you do but it just keeps looping after 1 press of the mouse

    View post on imgur.com

    View post on imgur.com

0
0

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.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.