...Get audio to fire off once and not continuously

0 favourites
  • 7 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hi there,

    I've seen this happen too often.. I have an audio sound I want to fire off when a condition is met, but instead of it just playing once.. it fires it off over and over and over again creating a reverberation effect.

    I've hacked around this in the past when I had maybe 1 sound to fire of at any given time, but now i'm dealing with a project that has a number of audio clips so I just thought I'd check with the community.

    Do i have to set up some kind of global variable that i have to keep flipping to fool the play into playing only one time or is there some trick to how i use "play" to just allow it to fire off once without having to surround it with other logic?



  • system trigger once while true?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • well i have to arrange things kinda weird sometimes to get it to work right..    sometimes i have to actually put the change condition back to false before it gets to the trigger audio.. sometimes that still doesn't seem to work..

    How ever as I test more right now, it might be that i'm using parallels currently to run C2 which is usually fine.. maybe some lag and using windows xp.. sometimes things don't fire off tight when testing other events too so it could be that.

  • I've also found the audio playback inconsistent. Occasionally a trigger, which arguably should only fire once (like a collision) would fire a couple of times and cause me much frustration.

    I've had best success using sub-event 'Trigger Once While True' as LittleStain suggests, even though the parent event is a trigger and my understanding is that this should not be needed. That has seemed to work consistently well for me. I've also tried Audo Tag "whatever" NOT playing - however, because option 1 using trigger once seemed the best for me I have little experience with option 2...

  • Trigger once while true should do the trick. If it doesn't then add a the condition If Sound isn't playing - play sound.

  • I just ran into this. I had sounds set to play at a certain frame of an animated sprite (using a variable). I was getting a reverb effect which was the sound playing twice in rapid succession.

    The System - `trigger once while true` works perfectly. Thanks for sharing.


  • ah ok cool i see that system event, very cool. I managed to get it to work though without using this but next time I'll have to be sure to call on it. At this point I'm not sure what I did to get it right, just shuffled things around till it worked.. heh

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