0 votes
by (150 points)
Hi All,

I'm pretty new to Twine so bare with me!  I have a bunch of audio files, with one in each passage.  I would like each audio file to start after x seconds of the person entering that passage.  Is there a way to do this?

I'm using Twine 2 and SugarCube 2.24.0

1 Answer

0 votes
by (68.6k points)

You could either fade them in or, if you wanted an abrupt transition, use the <<timed>> macro.

Example: Fade in over 10 seconds

<<audio "trackname" volume 0 fadeoverto 10 1>>

Example: Playback which starts after 10 seconds

<<timed 10s>><<audio "trackname" volume 1 play>><</timed>>

SEE: <<audio>>, <<timed>>

by (150 points)
I don't like the fade, because it cuts off the beginning of the audio.  As for timed, I keep getting the error below and don't know why.

Error: macro <<timed>> does not exist

Error: macro <</timed>> does not exist
by (68.6k points)

If you're seeing that, then you are not using SugarCube v2.24.0.  It may be installed, but your project cannot be using it because <<timed>> is a core macro.  I'd check your project to see what you're actually using—Twine 2 does come with the old v1 as well, so make sure you aren't using that.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.