Hintergrundmusik wird nicht gespielt

  • #1, by crankschenkFriday, 26. October 2018, 14:50 6 years ago
    Hallo allerseits,

    ich habe ein sehr eigenartiges Verhalten entdeckt. Diverse Hintergrundmusik wird gar nicht oder nur ganz selten gespielt. Ich bin dann dazu übergegangen, für jede Szene einzeln die Musik festzulegen (Szene -> Einstellungen) und den Haken bei "von vorheriger Szene übernehmen" rauszunehmen. Trotzdem funktioniert es nicht.
    Drücke ich im Editor zum Test auf das Play-Symbol, wird der Song gespielt. Gibt es einen Trick?

    Viele Grüße
    Manuel

    Newbie

    100 Posts


  • #2, by afrlmeFriday, 26. October 2018, 14:59 6 years ago
    Is this on new game or after loading from a save game file?

    Imperator

    7285 Posts

  • #3, by crankschenkFriday, 26. October 2018, 15:02 6 years ago
    Could be after loading a saved game.
    Why? Is that a problem?

    Newbie

    100 Posts

  • #4, by afrlmeFriday, 26. October 2018, 15:13 6 years ago
    Background music path is stored in the save game files because you can swap out the background music with action parts/Lua script.

    Also, I highly recommend never using the continue music from previous scene option because it will either play whatever music was playing in your menu/load/save scene after loading a save game or it won't play anything at all.

    One thing you can & should do is create an action part in an at begin of scene action for each scene & set the backgroud music for the scene with the action part, this is just a fallback in case it wasn't specified or doesn't automatically play the scene background music that you specified via scene properties.

    Quick note: you will likely encounter various random bugs after loading old save game files after making various changes to your project - especially if you have removed or added new things because the data in the save files will not contain the new/edited information.

    In other words you should not use the save system while your game is in development. You should wipe the saves & start fresh each session - also it's a good idea to only use the autosave system while working on your game too as it's easy to check if an autosave exists via action parts & delete it in the game launch actions section.

    Imperator

    7285 Posts

  • #5, by crankschenkFriday, 26. October 2018, 16:00 6 years ago
    Perfect.
    Thank you for the information.


    Newbie

    100 Posts

  • #6, by crankschenkSunday, 28. October 2018, 22:33 6 years ago
    I tested the behaviour of the background music. I used the same music in a couple of scenes and have left the checkbox "use the music from the previous scene" unchecked. It ist working sometimes - not with alle scenes. I don't know why. Could this be a bug?

    Newbie

    100 Posts

  • #7, by crankschenkSaturday, 03. November 2018, 01:52 6 years ago
    Hah! Found it!
    I forgot about the autosave, that I am loading at the start.
    After removing this it works fine.
    Thanx

    Newbie

    100 Posts