(resolved) Audio play by name does not work in sounds subfolder

0 favourites
  • 3 posts
From the Asset Store
In this template the music plays without looping in your game
  • I was here perplexed by this error. As the number of audio files for my game increased, I created subfolders within the sound folder. But in an event I was calling the audio by play (by name) instead of just play, this is because I type choose("audio1","audio2","audio3") ... and so I can have random audios played. Okay, I've done this before. But if I create subfolders, this audio, which is now in a sound subfolder, will no longer work if I use play (by name). It simply doesn't play the audio. Even if I call an audio just by name, without choosing, it doesn't find the audio if it's in a subfolder within the sound folder. Play by name only works if I put the audio inside the sound folder, but not in a subfolder. I racked my brain for hours to find out why the audio didn't play, as in other projects I created for testing it worked. So, I need these subfolders otherwise hundreds of audios will be impractical. How am I going to call them by name? Has anyone ever experienced this?

  • If the project 'Export file structure' is 'Folders' - which is now the default - then you also need to include the subfolder path in strings with audio file names.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If the project 'Export file structure' is 'Folders' - which is now the default - then you also need to include the subfolder path in strings with audio file names.

    It worked the way below, thank you very much.

    "FolderName/Audiofile"

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)