queue sounds.

0 favourites
  • 2 posts
From the Asset Store
75 explosion sound effects. Essential for many games, Explosions Sounds contains a mix of explosion and impact sounds.
  • In the game are several voice overs, and I need to make sure they don't overlap as it sounds terrible, but also make sure that each is played.

    Now, if say sound 1 is playing, and I want to play sound 2, I need something like:

    If (sound 1 still playing) {

    create new event:

         Audio on "1" ended: Audio play sound 2.


    or similar.

    The problem I see with this approach (even if creating events dynamically were possible), is that there is a window of opportunity for the sound 1 to end before the "on 1 ended" is registered or active, which means sound 2 will never get played.

    So perhaps we need a sound queue plugin, which will maintain a First in First out queue of voice overs to play in sequence, at the same time and independent of a other sound effects playing.

    Its logic would be more like:

    Every tick: (if no sound with tag "voiceOver" playing) {

    pop next sound item off queue.

    If item found, play item.


    C2 has no Queue structure, and an array would be less than ideal.

    any ideas? This must be a common issue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually the Array object has Push and Pop commands, so it can simulate a queue. You can look at rexrainbow's Timeline plugin. I vaguely recall people using it for sound sequencing.

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