How do i make a song continuously play and loop even when switching scenes?

How do i do this? I want to make it so that when a an attribute is true, it will play the music and loop. When it's false, i want the music to stop. I know how to make the music start and stop from an attribute, that's easy. But i want the music to continuously loop without starting over when i switch scenes. And i will have a pause button, and in the pause button, you will be able to turn the sounds on and off. So how do I do this?
I hope this i've made it easy enough to understand.
Thank you.

Comments

  • birkulesbirkules Member, PRO Posts: 29
    if you imported it as music it doesnt start over when you change scene, and music has a loop option. if you dont want it to start over after you turn off and on, you could make the rule so it turns music volume to 0 instead of turning it off. I dont have that much experience but hope this helps you some:)
  • DinoBitDinoBit Member Posts: 23
    edited November 2013
    Well, i put the music actor in the main menu. When i switch from an other scene to the main menu, the music starts over. But the volume idea is a really good idea. But it doesn't work unless I have the music actor in every scene, which brings me back to square one...
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
  • DinoBitDinoBit Member Posts: 23
    I know it does. You guys don't get the question. I have the song actor in the main menu. so when the game starts and i'm at the main menu, then the music starts. But the music actor is only in the main menu, so when i play a level in a different scene, i can't stop the music, start the music, or turn off the sound for the music. That's because the actor isn't in all of the scenes. But i can't just put it in all the scenes, because if i do, then the song restarts every time i switch scenes, and i don't want that! HOW DO I FIX THIS?
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    @DinoBit - you can just turn the volume down to 0 - it is a global game variable - you can also stop music at any time as it's a global game variable, then if you want to start it from scratch again just spawn the actor that made the music in the first place.

    Remember - global game variable - in your rules go to this...

    Attribute > Devices > Audio > Music Volume or Sound Volume

    Use behaviours and rules for the rest.

    Go easy on the caps too.

    Cheers, M@
  • DinoBitDinoBit Member Posts: 23
    I got it now. Thanks.
Sign In or Register to comment.