continue background music from previous scene

  • #1, by constantinMonday, 30. October 2017, 13:08 7 years ago
    es scheint, als wäre dieses feature ziemlich buggy. in 50% der fälle funktioniert es, in den anderen 50% spielt es überhaupt keine musik. 
    ich möchte bei einem bestimmten ereignis hintergrundmusik setzen. ich habe umfangreich getestet, aber ich komme nicht drauf, warum es manchmal geht, manchmal nicht. gibt es damit erfahrungen? oder wie löst ihr das problem, wenn musik auch in der folgenden szene gespielt werden soll?

    it seems that this feature is quite buggy. in 50% of the cases it works, in the other 50% it doesn't play any music at all.
    I want to set background music for a certain event. I have tested extensively, but I can't figure out why sometimes it works, sometimes not. is there any experience with that? or how do you solve the problem, if you want to play music in the following scene?

    Forum Fan

    167 Posts


  • #2, by afrlmeMonday, 30. October 2017, 14:25 7 years ago
    I highly recommend not using the built in continue music from the previous scene option as it literally continues the music from the previous scene.

    Let's say for example that you at some point during the scene decide to open up the main menu & let's say that the main menu plays a different song, now when you switch back the scene will be playing that song. The same principle applies when you load from a save game to a scene with that option enabled. If music was playing in the save/load menu scene then it will play that, if no music was playing then no music will play.

    Instead, I personally recommend that you directly link the same music audio file to each scene that you want it to play in. The engine on scene change auto detects if the background music files/paths are the same & if they are then the music will just continue playing without pausing or restarting. Also the good thing about this is that when someone loads a save game that is on one of those scenes it will play the correct music.

    Imperator

    7285 Posts

  • #3, by dionousMonday, 30. October 2017, 14:42 7 years ago
    Instead, I personally recommend that you directly link the same music audio file to each scene that you want it to play in
    Totally agree with this. Main Menu/Save Menu music will make it a mess otherwise.

    Forum Fan

    248 Posts

  • #4, by constantinTuesday, 31. October 2017, 07:25 7 years ago
    you mean by simply setting "play sound" at the begin of both scenes? should i uncheck "continue music" in the properties settings? 
    thank you. 

    Forum Fan

    167 Posts

  • #5, by caligarimarteTuesday, 31. October 2017, 09:51 7 years ago
    Not with "Play Sound"; You should simply have both Scenes play the same Music in the Scene Properties. Like, I have a Forest, and the few Screens showing the Forest all have the same Forest-Music set in their Scene-Properties. (If I were to set any of them to "Continue Music", the Forest-Scene bordering on the Swamp-Scene would play Swamp-Music if that's where I come from, and that is obviously not what I want.)
    Do not think in complicated Ways, just imagine that "Continue Music"-Option wasn't even there in the first Place, and that you just have to set the Music for each Scene specifically, in the usual Place (namely the Properties where you also set Scene-Image and -Name etc.).

    EDIT:
    By the Way, there is an Action Part specifically for changing the Background-Music (also under "Multimedia") -- "Play Sound" would be the wrong Choice. There are a few Occasions where I prefer to use that Action Part for changing the Background-Music instead of setting it in the Scene-Properties: My Forest, for Example, does in Actuality not have the Music set in its Properties, but in an Action that checks whether it is Day or Night in the Game-World and then accordingly switches to the Day- or the Night-Music for the Forest. Another Project of mine checks which Chapter is currently active and accordingly changes the Music for several Scenes to evermore darker Versions. So, if you are doing some special Things with your Music, you might very well prefer thart Action Part -- and since you want to set specific Music at certain Events, you will need that Action Part anyway.

    Forum Fan

    145 Posts

  • #6, by constantinTuesday, 31. October 2017, 15:26 7 years ago
    that is exactly what i was trying to do. but it just doesnt work. 

    Forum Fan

    167 Posts

  • #7, by constantinTuesday, 31. October 2017, 15:44 7 years ago
    unlike you said, the music stops for about 100 ms then starts to play from the beginning.

    Forum Fan

    167 Posts