I'm new to Twine, using version 2.0 app and SugarCube2. I want to create a story that has a different audio file in each passage. But I don't know where to store the files and also don't know what to type into the passage box in order to command the program to use the audio.
If it's easier to do this on Twine 1.4 I'm willing to do so, but saw on another board that SugarCube comes with audio functionality.
Please help!
Comments
You store your sound files externally, whether you host them on a website or place them in a folder relative to your generated story HTML file is up to you but the URL's you use to reference the file is slightly different based of this choice.
If you read the Audio Macros documentation you will see that you use the <<cacheaudio>> macro to define what sound files to use and the <<audio>> macro to play the sound file.
Ok I've inserted the macros and put all my mp3s in a file.
But I get this message:
"Twine 2 macros use a different syntax to Twine 1 macros"
I see the doc says I should put the cached audio in the StoryInit file but the same thing happens.
That error message occurs if you are using <<macro-name>> formatted macros but you Test/Play/Publish your story with Harlowe selected.
eg. If the audio file is named beach.mp3 and it is stored in an audio folder on a domain of www.mysite.com, then you would add something like the following to your StoryInit passage:
If you use the Publish to File option to create a HTML file version of your story and then upload that HTML file to your website, then you could use relative URL's to reference the audio files.
eg. You create a story HTML file named adventure.html which you upload to your website, and you want to access the same audio file used in the first example then you could of added something like the following to StoryInit:
In both of the above cases you would add something like the following to one of your passages to play the cached audio file:
The only exception is when you're using the browser-based version of Twine 2, which supports whatever media your browser of choice does (though its limitations make using it just to get around having to Publish unwise).