0 votes
by (730 points)
Like some sort of a code where you can insert background music in your story, and the player can mute it with the click of a button. Can I do that using Twine?

I'm also kind of new to this thing.

1 Answer

+2 votes
by (62.7k points)
edited by
What story format and version?

Edit from the distant future:

Use HAL instead of Howler for Harlowe.

by (730 points)

I am using Twine 2 in story format Harlowe 2.0.1

by (62.7k points)

People have been asking about this a lot (and for years, now), so I put together a repository with all the code you'll need, an optional, simplified set of helper functions, and documentation and examples. 



Note that I just finished this. There might be bugs. 

by (100 points)
Hey there, Thank you in advance,

Im a noob, and im trying to add some background music.  I have followed the instrucitons.  First thought,

Do i need to copy the first two lines in the script folders?

And also it's not working...


this is what i have done


A.create('forest sounds', 'http://soundbible.com/grab.php?id=1818&type=wav');
by (62.7k points)
edited by
i don't think your link is an actual sound file.

When I click it it sends me to a webpage, not a file. You need to get the actual file's url.

Edit: first two lines: if you mean the comments, no you don't need them.