Backgroundmusic should loop - if user wants it. How???
akimann
Member Posts: 62
Hi folks,
just one question: I want to make a button like "music loop/no loop". But I have no idea how I could manage this with the "play music"-option. Is it possible to check/uncheck the "loop"-option in "Play Music" via an attribute?
just one question: I want to make a button like "music loop/no loop". But I have no idea how I could manage this with the "play music"-option. Is it possible to check/uncheck the "loop"-option in "Play Music" via an attribute?
Comments
Make an integer attribute. game.Music
When you press the mouse button, or touch(pressed) the actor:
Change Attribute: game.Music = (game.Music + 1)%2
So the value of Music is either 0 or 1. You can check for those values in the rule.
when game.Switch =1
Stop Music
Otherwise
Play Music
thank you for your help, but I thought about something different. Imagine you have a 1min Soundfile. This Soundfile should repeat from the beginning, when it reached the end AND when the user choosed that this sound file should be looped. So when "loop" is checked it will play again and again and again and.....
Sorry about my bad english (come from germany) but I hope you know what I mean :-)