another background music issue, please help
pjnolen
Member Posts: 152
I have music begin playing when the 'start screen' comes up. I have buttons for sound options, difficulty settings, etc.
When the screen comes up, the music starts playing fine. If the player goes to the sound options, difficulty screen, etc, it keeps playing fine.
But if the player clicks the back button to return to the main start screen, the music resets back to the beginning. I need it to just keep playing. If they go to one screen, then back, then another screen, then back, it just keeps resetting back to the beginning of the music until they press start and go into the game.
How do I just have it continue playing and not interrupt itself continuously until they start the game. Changing the setting for looping it, doesn't affect it.
I even created a boolean attribute, and when the screen loads it sets it to true, and when that is set to true start playing the music. I hoped, if it was already set to true it wouldn't reset the music. It still does.
So...
I created a button, that when pressed changed the boolean to true. So that it would not reset, and just stay true. But that didn't work either, every time the scene loads, it resets the music.
Is there a way to have the music not reset when the main screen loads?
When the screen comes up, the music starts playing fine. If the player goes to the sound options, difficulty screen, etc, it keeps playing fine.
But if the player clicks the back button to return to the main start screen, the music resets back to the beginning. I need it to just keep playing. If they go to one screen, then back, then another screen, then back, it just keeps resetting back to the beginning of the music until they press start and go into the game.
How do I just have it continue playing and not interrupt itself continuously until they start the game. Changing the setting for looping it, doesn't affect it.
I even created a boolean attribute, and when the screen loads it sets it to true, and when that is set to true start playing the music. I hoped, if it was already set to true it wouldn't reset the music. It still does.
So...
I created a button, that when pressed changed the boolean to true. So that it would not reset, and just stay true. But that didn't work either, every time the scene loads, it resets the music.
Is there a way to have the music not reset when the main screen loads?
Comments
I was about to start a new thread but saw this one so I thought I could bump yours up if you still had that problem.
Have a rule in your logo actor:
If you press your logo, or after a certain amount of time, go to the main scene.
*before* The 'go to next scene' behaviour, put in your 'play music' behaviour.
Because you'll never go back to the splash screen (you seem to be going back to the menu screen at most) the music should never stop playing or restart.
Hope that helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Sometimes it helps to think 'outside the box' a bit.
Fortunately, I live outside the box!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Have a rule which says :
If musicplaying = 0
Play music
Change musicplaying to 1
This will play the music only if music isn't already playing.
Then In your gameoverscreen have a rule to change musicplaying back to 0, to start music again once you return to the menu!
I think that we were asking GS to reset everything with one button click essentially. Unfortunately, not all variables were included in the reset, so I just did it the manual way.
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io