Getting music to play thru entire game?
Tyvan
Member Posts: 29
After each level aka scene , the best I can do is get the music to restart over again.
I read a post that said instead of go to x scene make it change to x scene. This did not work for me.
So how can I get music (one track looped) to play during the entire game no matter what happens in each scene or how many scene changes there are?
Thanks guys!
I read a post that said instead of go to x scene make it change to x scene. This did not work for me.
So how can I get music (one track looped) to play during the entire game no matter what happens in each scene or how many scene changes there are?
Thanks guys!
Comments
If you don't use these, then you can start a music track playing on your splash screen (the 1st screen with your logo on). Then, never go back to that scene (at the end of the game, go to the menu screen instead, for example).
This way, your music will start and play continuously no matter what you do.
Unless, as I mentioned, you reset the game or scene.
Hope that helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Then have in that same button if game music equal to 1 play music loop. It use to work for me
My game will have to reset a scene many times. So I need a way to continuously play a track even if the scene gets reset or changed.
Sorry I should have stated that in my first post.
So anytime you need to restart a level or same scene, use change scene instead of reset if you want to have the music keep playing.
The next scene needs "play music" and select continue current music
All scenes need something to tell it to play music even if it is the same song without a break
... I think... that is what i do anyways
Global music attribute attached to a music on button but also another global attribute I call music was on. So when I touch the music on button it sets "music to 1 and also sets music was on to 1"
Then on each scene I place a blank actor off screen that says this if music is 1 play music
New rule if global attribute music was on is 1 then change attribute music on to 1
The down side is that music starts over
My music off button just sets music and music was on to 0
I do this because when my actor dies I have it stop the current music and play the death scream/melody