Forum rules - please read before posting.

Pause Menu music problem

I want to play a unique piece of music in my pause menu, I can get it to start when the menu opens, In the pause Menu's DeselectInventory Action list I have a Sound>PlayMusic>Play but when I close the menu it goes back into the game and the menu music still plays, so I made an Action List for when the Pause Menu turns off to say Sound>PlayMusic>Stop, but then the actual scenes music doesn't restart. The music for the scenes themselves all have a Sound>Play Music in the OnStart cutscene. Any Ideas what I am doing wrong?

Comments

  • You can only play one Music track at a time - so if you play your Menu music, you'll end up stopping your scene music, and will have to resume it after closing the Menu.

    The difficulty here is knowing which track to resume at this point - because it's based on which scene is open.

    What you can do is move each Sound: Play music Action in your OnStart cutscenes into a separate "Play music" Cutscene, and then fire that Cutscene from OnStart using an ActionList: Run Action. Then, attach a Constant ID component to each "Play music" Cutscene and manually assign each the same ID number, e.g. 123.

    Then, you can add a new ActionList: Run Action to your "Pause menu off" ActionList that runs the "Play music" Cutscene from one of your scenes. Having an ActionList asset refer to a scene object will cause it to rely on its Constant ID value - so if all are the same, it'll look for the "Play music" Cutscene in whichever scene you happen to be in.

  • Thanks Chris I will try that

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.