Adding Sound

Hey I’m pretty new to coding in choice script but I was wondering if it was possible to add music into a game? Ideally, I would have some sort of part in the stats screen (maybe like a “music player” or “iPod” section") where there would be a list of music the player could pick and then have it shuffle play.

1 Like

I have no idea whether sounds set from the stat menu “stick” (stat menus can be a bit weird in how they remember things set in them at times). If no one has more info you might just need to try it and see what happens.

I doubt you can make it a “shuffle play”. As far as I’m aware, a sound plays until it is finished as a file. You’d probably need some sort of script to make it continue to play random music files which you cannot add to games published through HG.

Might want to look at @Samuel_H_Young games. He’s the only one I can think of that has music running though an entire published game.

Make sure you have the command to switch it off too as a lot of people dislike music playing when they are trying to read.

1 Like

There are methods to incorporate sound or music, although the drawback is that they abruptly cut off after a certain duration, so you have to make adjustments to the sound yourself so it doesn’t start abruptly or end in an ugly way.

Honestly if you want customisable sound to be a major part of your game you’d probably be better off with twine.

1 Like