What is the best approach background music with continue music from previous scene?

  • #1, by trepnWednesday, 31. January 2018, 10:51 2 years ago
    I'm looking into background music in my game and am using the 'continue music from previous scene' checkbox. This works fine if I go in one direction, but when I encounter a scene with new background music and go back the same path as I came, all the scenes with the 'continue music from previous scene' now play the other background music. This is ofcourse to be expected since it keeps playing the last triggered music but I would like it to start playing the other background music when crossing the border. What is the best way to do this? Can I do it in editor? or does it need to be done with LUA?

    Newbie

    60 Posts


  • #2, by atrusWednesday, 31. January 2018, 11:22 2 years ago
    The best approach for me is never to use the 'Continue music from previous scene' tick box. Always set the music to be played explicitly by selecting the proper file and it will do the job; VS sees that the file is the same and continues the same music anyway. Otherwise you will always have issues with menu scenes etc.

    Forum Fan

    237 Posts

  • #3, by afrlmeWednesday, 31. January 2018, 11:26 2 years ago
    Don't use the continue music scene system at all. It's pretty much useless outside of menu scenes. It will always play the music that was playing in the previous scene that you were just on - providing there was music playing. Also if you load a savegame & you load onto a scene where you had that option enabled then it will play the music that was playing in the savegame menu or no music at all if none was playing.

    Instead, just manually link the music file for each scene that you want to play the same music & when you change the scene it will automatically check if the music file is the same & if it is then it will just continue to play without restarting.

    Imperator

    6771 Posts

  • #4, by trepnWednesday, 31. January 2018, 11:39 2 years ago
    Haha, ok. I'll just link it to all the scenes then. 

    Tnx both of you!

    Newbie

    60 Posts

Write post