Sound won't stop looping
Shpint
Member Posts: 404
Hi,
I have 2 sounds. Each is 2 sec and will loop. I want each to play according to the amount of fingers touching the screen.
Here's the rule
..When touch is pressed
..Touch count = 1
.......Play sound 1
..When touch is pressed
..Touch count = 2
.......Play sound 2
When I touch with only one finger, everything is fine. When I touch with 2 fingers, the sound 2 never stop!!!
It's a .wav imported as sound not music.
How can I fix this?
Thanks
I have 2 sounds. Each is 2 sec and will loop. I want each to play according to the amount of fingers touching the screen.
Here's the rule
..When touch is pressed
..Touch count = 1
.......Play sound 1
..When touch is pressed
..Touch count = 2
.......Play sound 2
When I touch with only one finger, everything is fine. When I touch with 2 fingers, the sound 2 never stop!!!
It's a .wav imported as sound not music.
How can I fix this?
Thanks
Comments
Rule
When all conditions are valid:
game.Touches.Count = 2
-----[play sound 2]
otherwise
-----Rule
-----When all conditions are valid:
-----game.Touches.Count = 1
----------[play sound 1]
Make sure run to completion and loop are NOT checked in the Play Sound behavior.
I have 10 sounds in total.
Also try doing it without the "otherwise". Make a separate "stacked" rule for each touch.
Like this:
When touch is inside:
...When touch is pressed:
......game.Touches.Count = 1
......play sound 1
(BTW...why do you need touch counts? The sounds should play regardless I think...if there are multiples and they are operating independently)
If that doesn't work...try making a separate rule for the touch and a separate rule for the sound.
For each sound button:
Rule:
When touch is pressed:
.....game.playSound1 = true
otherwise
.....game.playSound1 = false
Rule:
when game.playSound1 = true
(play sound 1 >> loop)
Repeat for each sound button ID.