We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Dynamic sounds

Home Forums Bug Reports and Feature Requests Dynamic sounds

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18192
    scalare
    Customer

    Hi Yuri,

    thank you very much for making the changes to make the “replace texture”, “set value” and “change color” puzzles able to accept variables in version 2.14! We’ve just found that a similar situation happens with the “play sound” puzzle. The puzzle accepts a variable instead of the “load sound” puzzle, but it won’t play.

    What we’re doing is to set a variable with the URL of the sound file (mp3), and then setting that variable into the play sound puzzle. The URL is correct, because during our tests, when the URL wasn’t correct, there was a separate error message showing it was wrong in the console. In checking into the generated visual_logic.js, we noticed that when you use the “load sound” for the “play sound” puzzle, the code goes like this:

    playSound(loadSound(“./sounds/engine_loop.mp3”), true);

    but when we use the variable instead, the generated visual_logic.js code does not include the loadSound function, therefore making impossible for the sound to be loaded.

    Any chance this can be fixed / made to work dynamically too? Or maybe adding a separate “load dynamic sound” puzzle that works with variables so there is a way to create the audio elements dynamically?

    Thanks a lot!

    #18202

    That makes sense. Adding to our TODO list!

    Chief 3D Verger | LinkedIn | Twitter

    #18211
    scalare
    Customer

    Excellent! Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.