One sound at a time
blazecreative
Member, PRO Posts: 5
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Thanks LOG. I'll give that a try.