Sound won't stop looping

ShpintShpint Member Posts: 404
edited November -1 in Working with GS (Mac)
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

Comments

  • ShpintShpint Member Posts: 404
    Bump
  • firemaplegamesfiremaplegames Member Posts: 3,211
    First, I would arrange your Rules differently, like this:

    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.
  • ShpintShpint Member Posts: 404
    Thx FMG, but I want the sound to loop.
    I have 10 sounds in total.
  • ShpintShpint Member Posts: 404
    Bump
  • synthesissynthesis Member Posts: 1,693
    Trying putting the rules inside another rule that says when Touch is inside.

    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.
  • ShpintShpint Member Posts: 404
    synthesis said:
    (BTW...why do you need touch counts? The sounds should play regardless I think...if there are multiples and they are operating independently)

    I want them to loop as long as my fingers are touching the screen. I have 10 sounds. 1 for each touch count. and thank you, I will try that and let you know if it works or not.
Sign In or Register to comment.