Howdy, Stranger!

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

Simplest coding to add sound and quick transition

I'm making a survival/horror story, and of course sound helps to make the atmosphere more convincing. I am completely new to Twine, I know the basics and a few more advanced tricks, but I don't know any coding outside of the simple ones used for Twine (built in macros, if statements, etc...). There isn't much online about Twine aside from this forum, so I haven't been able to find a simple code for my needs. Does anyone know a simple way to 1. Play/loop sound for the duration of a passage or two 2. Play sound on click? Ex: I want to add a dripping sound when the player enters a flooded chamber.

Second, I want to add a few jump scares into my story. Each new passage fades into the next, how do I change it so an image instantly pops up on the screen? I want to combine this with a scary sound to make jump scares. Like I said, I am completely new to this, any help is greatly appreciated.

Comments

  • PunchedPeach72 wrote:

    I'm making a survival/horror story, and of course sound helps to make the atmosphere more convincing. I am completely new to Twine, I know the basics and a few more advanced tricks, but I don't know any coding outside of the simple ones used for Twine (built in macros, if statements, etc...). There isn't much online about Twine aside from this forum, so I haven't been able to find a simple code for my needs. Does anyone know a simple way to 1. Play/loop sound for the duration of a passage or two 2. Play sound on click? Ex: I want to add a dripping sound when the player enters a flooded chamber.

    Second, I want to add a few jump scares into my story. Each new passage fades into the next, how do I change it so an image instantly pops up on the screen? I want to combine this with a scary sound to make jump scares. Like I said, I am completely new to this, any help is greatly appreciated.


    I'm fairly new to Twine myself. :)

    You will need a macro for the playsound, which you can find here http://www.glorioustrainwrecks.com/node/5061 there is a link for a txt file which has the macro script. You want to paste that into a "script" passage. Just right click somewhere in Twine and choose "New Script Here" and paste that macro code into it. Now you will be able to use those playsound macro commands listed on that page/link. 

    As for question two. Using another custom macro set found here http://www.glorioustrainwrecks.com/blog/584 scroll down to "Twine: Combined <<Replace>> Macro Set." which is where there is another macro script. Using the same method as described above for the playsound macro, add it to your game.  Then you will be able to use <<timedcontinue 2s>>. You could have the intended passage show and write something leading up to the scare...then insert that macro command which will give a delay of 2 seconds or how many seconds you want, then you could call up the picture (which I am guessing will display instantly) followed by the playsound macro command.

    I hope that helps.
Sign In or Register to comment.