So I’m looking to have some ambient noises playing through several passages in my twine story using Harlowe 3.1. Say, a bustling city during a few different passages and a cave during a few other ones. The code that I’m currently looking at is the one shown below used in javascript:
var audio = document.createElement(“audio”);
audio.src = “URL to audio here”;
audio.loop = true;
audio.play();
However, this code will just play a singular sound throughout the entirety of the story, but I’d like it to play different noises for each scene, like I said. Is there anything I should add to it?