How do I prevent my gunsounds to overlap after each bullet?

  • Hey all,

    I haven't had this problem with the pistol proberly because it does not fire fast enough, but since I added an assault rifle, I bumped into this issue and cannot seem to solve it.

    Anyone has an idea?

    Thank you in advance.

  • I would say you could 'stop' audio on bullet firing then 'play' audio in the same event but it might sound like the audio is cutting off which also isn't great, but it would fix the overlapping sound. The only way to really fix it properly is to cut down the length of the original sound.

  • This sounds like a classic game audio question. I think the answer might be to get a clip of automatic weapons fire and use it instead of just a single gunshot sound. The brain is forgiving in that the sound doesn’t have to be perfectly in sync with the visuals, just as long as it is close.

  • Pillarist

    Add a tag when playing the sound, that way you can add in a check whether the sound is already playing, before playing it again.

    Here's an example for C2, but you should be able to do the same thing in C3

    https://www.dropbox.com/s/gv7l6ns381q2h ... .capx?dl=1

    Without the tag check, you can continually click for a new sound, but with it in clicking will only generate a new sound when the old sound is finished.

  • Pillarist

    Add a tag when playing the sound, that way you can add in a check whether the sound is already playing, before playing it again.

    Here's an example for C2, but you should be able to do the same thing in C3

    https://www.dropbox.com/s/gv7l6ns381q2h ... .capx?dl=1

    Without the tag check, you can continually click for a new sound, but with it in clicking will only generate a new sound when the old sound is finished.

    mhmm ill give it a try, I wonder though, isn't there an option to stop music? so I play it, after 0.3sec I stop the sound before it shoots another bullet so it will sound like a loop?

    If I use a sound that has the full clip firing it can only be used if u hold the shoot button, and if you release it it should stop again otherwise it would keep sound like its firing even if you shoot 1 bullet.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • mhmm ill give it a try, I wonder though, isn't there an option to stop music? so I play it, after 0.3sec I stop the sound before it shoots another bullet so it will sound like a loop?

    If I use a sound that has the full clip firing it can only be used if u hold the shoot button, and if you release it it should stop again otherwise it would keep sound like its firing even if you shoot 1 bullet.

    There is an option to stop a sound, you will need to tag the sound for that too, but I think the better option would be, as cjbruce suggested, to have a single shot sound (or multiple separate single shot sounds for variety), and play that with each shot. That's what I do in my current project and it works well for automatic weapons.

  • Alternatively you can try fading the volume of each individual bullet's sound depending on the weapon.

    But it would probably be best to use different sounds for different weapons...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)