Sound file not playing

  • #1, by GL-StudioMonday, 20. July 2015, 06:00 5 years ago
    Hi all, I need your help.

    I have been working on my game for the last four years (taking my time) and now I have come across a problem I can't figure out.

    I have recently moved over to 4.2 from 3.7 and the problem I'm having is with in the save and reload script.
    When I go to save my game and reload that save game the sound file does not want to play but when I use the back button to go back into the game the script does work.
    however all of it does work well in 3.7.

    If you take a look at my two picture you will see how I have it scripted for both the LOAD button and the BACK button.
    Please any help will be GREAT! Thanks...

    Newbie

    8 Posts


  • #2, by sebastianMonday, 20. July 2015, 08:52 5 years ago
    seems that the loading prevents the rest of the actionpart to fire correctly. Try adding a short pause after Load Game

    Thread Captain

    2337 Posts

  • #3, by GL-StudioTuesday, 21. July 2015, 04:15 5 years ago
    Hi Sebastian,
    Thank You for your help very much appreciate it.
    I did try to add a Pause action before and after the Load Game action but it still did not work..
    I don't understand, it does work in 3.7 but not in 4.2 and with the back button in 4.2 it does work as it suppose to.
    Any other suggestions would be very helpful.

    Newbie

    8 Posts

  • #4, by turricanTuesday, 21. July 2015, 09:27 5 years ago
    Hi,
    did you tried to convert the file in .ogg?
    an another idea: the filename contains many chars. try if a shorter string solve the problem.
    greetings

    Newbie

    43 Posts

  • #5, by sebastianTuesday, 21. July 2015, 12:49 5 years ago
    just an idea: could it be that the stuff after the load game action part just dont get used anymore because the loaded savegame doesnt know about the Action parts anymore?

    Thread Captain

    2337 Posts

  • #6, by SimonSTuesday, 21. July 2015, 13:47 5 years ago
    Please don't use wav and mp3. Recommended is ogg or opus. Wav-files are slow and unstable. Mp3 has licensing issues and we don't test it regularly.

    Thread Captain

    1369 Posts

  • #7, by GL-StudioWednesday, 22. July 2015, 00:20 5 years ago
    hi again guys,
    I converted the sound file to .ogg and it still does not seem to want to work.
    Could it be a bug in the load action?

    Thanks for your help guys...

    Newbie

    8 Posts

  • #8, by afrlmeWednesday, 22. July 2015, 02:05 5 years ago
    As mentioned, it's probably because the rest of the action block got canceled out after loading from a save file. If you plan on having that sound play on each playable scene, then it might be more beneficial to just add the play sound action inside of an at begin of scene action for all scenes you want it to play on. Alternatively you could write a Lua script that listens for scene change to non menu scenes & have it call a called by other action containing the sound action each time the scene changes.

    Imperator

    6842 Posts

  • #9, by GL-StudioWednesday, 22. July 2015, 05:31 5 years ago
    Thank you AFRLme,
    but unfortunate for my game it's not doing the trick.
    I tried (at begin of scene action) and (called by other action)
    I guess the only thing left to do is to write a Lua script however this part is above my head, if there is someone in this forum that can help with writing a Lua script please let me know I will pay.

    Newbie

    8 Posts

  • #10, by sebastianWednesday, 22. July 2015, 07:30 5 years ago
    try adding the sound files after the SAVE game Action. When loading the game it should continue where you saved...hopefully..maybe...

    Thread Captain

    2337 Posts

  • #11, by GL-StudioFriday, 24. July 2015, 03:16 5 years ago
    Hey Ya'll Thanks for your help I very much appreciate it.
    I have found a simple work around and now it working the way I want it to.
    Know I can move on with completing it.

    Newbie

    8 Posts

Write post