Looking the Audio Scriptiong project to see how sounds are played.
I want to play external sounds on runtime, and adding an URL it works.
But i can't control that sound in events for play, add, FX or whatever, due there is no tag.
How i add in the script a tag for an audio file to be referenced in events to manage like any other sound for play/stop/resume/fx/ or whatever by tag ?
// Audio manager class for handling audio playback.
let audioManager = null;
// References to loaded audio files as global variables
let audioSfx5 = null;
let audioSfx7 = null;
let audioEpicArpg = null;
runOnStartup(async runtime =>
// Initialise the audio manager. See AudioManager.js for details.
audioManager = new AudioManager(runtime);
// During the loading screen, load both sound files as
// AudioBuffers and the music track all in parallel, so
// they are ready for immediate playback on startup.
[audioSfx5, audioSfx7, audioEpicArpg] = await Promise.all([
// These functions are called by the button click events.