One sound at a time

My game has a few buttons to press for background sounds. I have assigned the sounds to the buttons, but I would only like one sound to play at a time. Anyone know how to create a rule to stop other sounds from playing when a single button is pressed?

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited September 2015

    Everything in GS is logic coding so you create a lockout and add it to your button. So say you make an attribute sound an integer.

    Button 1 rule

    When touch is pressed and sound attribute = 0

    Play sound (run to completion checked)
    Change attribute sound to 1

    Timer after (time = length of sound)
    Change attribute sound to 0

    Do the same in each button changing the appropriate time and do not put the other events aka what ever the button controls in the same rule just the sound. Leave the other rules alone with their conditions as setup.

  • blazecreativeblazecreative Member, PRO Posts: 5

    Thanks LOG. I'll give that a try.

Sign In or Register to comment.