Have music play continuously when switching scenes?

mi1ezmi1ez Member, PRO Posts: 18
So I have an actor on my Main Menu that plays the music, and when I go to my "Stats" scene, the music continues to play which is good. However, when I press the back button and return to my Main Menu, the music restarts. How can I make it so the music plays continuously? I know it's not a huge deal but I'd like to fix it if possible :) Thanks in advance!

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited July 2013
    I'd make an boolean attribute called musicOn (starting as false) and enclose your play music behavior in a rule that says:

    if musicOn is false then

    behavior play the music
    behavior change attribute musicOn to true

    So then it will not restart because musicOn will be true next time it gets to that rule.
  • mi1ezmi1ez Member, PRO Posts: 18
    @jamie_c Thanks it works very nicely!
Sign In or Register to comment.