Play multiple instances of a single sound entity

Get help using Construct 2

Post » Mon Jun 03, 2013 6:24 pm

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.

B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Mon Jun 03, 2013 10:10 pm

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?
Scirra Founder
B
378
S
220
G
84
Posts: 23,867
Reputation: 188,027

Post » Mon Jun 03, 2013 11:25 pm

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.
B
33
S
4
G
1
Posts: 272
Reputation: 2,500

Post » Tue Jun 04, 2013 12:33 pm

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 :]
B
33
S
4
G
1
Posts: 272
Reputation: 2,500


Return to How do I....?

Who is online

Users browsing this forum: Odin and 12 guests