Play multiple instances of a single sound entity

  • I tried searching through the forums and have spent 5 hours on this problem, any help is very very appreciated.

    I have these multiple instances of bubbles, with their own instance variables. They work perfectly and disappear when I press them long enough, just as programmed.

    Sound wise I have a problem, and would like the play pause specific instances of the sound so pressing each bubble and ceasing pressing it at the right moment, will stop the sound at a specific place, and when I continue pressing it, it would continue where it left off. I have like 10 bubbles of this sort, and I need each one to start and stop relative to how much it has been pressed.

    I tried adding ""popsynth" & Turboboost.IID"" for the tag (where popsynth is the sound), inside the code for each bubble along with the instance variables so it plays a locally unique version of the sound, but that is probably not the way to go, especially since it doesn't work.

    TLDR: I am trying to play different specific instances of a single sound, and control the instances with play & pause separately. How could I do that successfully?

    Thank you very much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like you were on the right track using the object's ID in the tag to identify samples uniquely. What didn't work about it?

  • Just one instance of the sprite worked as it should. The others didn't, and just looped infinitely. But if I'm on the right track, I will drill down some more towards this direction.

    As always Ashley, thank you very very much.

  • UPDATE, for those that might come to this post needing the same thing I did.

    I made it work. Just named it spritesname.IID and it works every time. But it's important to note that the IID gets changed every time a sprite instance is destroyed. That's why It wasn't working before. Now I just set everything disabled, collisions etc, and invisibility on.

    So thanks, again :]

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