Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Help with L's HTML5 Sound Macros

Using Twine 1.4.2 with Sugarcane. I can't manage to get his macros to work (or any other custom macros, for that matter). Placed the sound file in the same folder, set it as a variable, tried hotlinking, unchecked ROT13 obfusciation...nothing!

Help would be much appreciated :)


  • notes:
    a. The following instructions are written from a Windows point-of-view, you will need to translate them if you use a different Operating System.

    b. The sample MP3 file I used was Anchors Aweigh from NoiseAddicts

    c. You can change the names of any folder or file mentioned in the instructions to anything you want, just remember to take the different name into account when using the instructions.

    Step-by-step instructions:

    1. Create a new folder on your local hard-disk to store your Story Project TWS file in, I named my folder mystory and located it on my C: drive.

    eg. C:\mystory

    2. Create a new sub-folder within the mystory folder to store all your media related files into, I named my folder media

    eg. C:\mystory\media

    3. Place the sound file you want to play within the media folder, I downloaded my sample MP3 file from NoiseAddicts and named it anchors-aweigh.mp3

    eg. C:\mystory\media\anchors-aweigh.mp3

    4. Open the Twine 1.4.2 application, use the File -> New Story menu items to create a new Story Project, use the File -> Save Story menu items to save your new story project TWS file within the mystory folder. I named mine sugarcane-sound-demo.tws

    eg. C:\mystory\sugarcane-sound-demo.tws

    5. Use the Story -> New -> Script menu items to add a new script tagged passage to your story, I gave mine a title of Sound Macro Script

    6. Visit the Leon's HTML5 sound macros web-page, click on the link to the TwineMacros-SoundMacros-1.1.2.txt file, and copy the contents of the resulting page into the Sound Macro Script passage.

    7. Paste the following into the Start passage.
    <<playsound "media/anchors-aweigh.mp3">>
    8. Use the File -> Save Story menu items to save your changes, and then use the Build -> Test Play menu items to test your story.

    You should hear the music playing.
Sign In or Register to comment.