How can i Stop a sound?

JCFordJCFord Member Posts: 785
There is a stop music behaviour, but no stop sound?

I have a sound fx that plays at the start of a new scene (sound A), there is also a button that if the user touches plays a sound fx (Sound B).

At the moment if the user clicks the button very early at the start of the scene then both sound A+B play.

how can I make it so that if the button is clicked that it checks to see if sound A is still playing and if so stops sound A and plays sound B?

thanks

Comments

  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    game.playsound true

    scene1:

    if playsound = true, play soundA

    Button:

    actor receives touch and playsound true
    change attribute to playsound = false
    play soundB
  • JCFordJCFord Member Posts: 785
    Worked a treat. once again thank you t-shirtbooth
  • JCFordJCFord Member Posts: 785
    Actually I tried it T-shirt and it didn't work but Hunnenkoenig your global gamesound did the trick so thats to you too!
  • fiabanfriendsfiabanfriends Member Posts: 16
    ok for the newbee can you explain exactly how to put those attributes in i can't find any playsound or where to add the sound name i wanna play
Sign In or Register to comment.