Today we are going through making your first twine!
Install twine. You can download it from twinery.org
It will automatically make a folder in Documents. In documents/twine make a "build" folder
Install twine. You can download it from twinery.org
It will automatically make a folder in Documents. In documents/twine make a "build" folder

Within "builds" make a folder with your next project in it
And in that, put the "media" folder attached.
Inside the media folder is two mp3 files, I made for you :)
Inside the media folder is two mp3 files, I made for you :)
Now open Twine.
This is what we're going to make:
This is what we're going to make:
So, first we have to change the language we are using. Go to "change story format"
and select sugarcube :)
While Sugarcube is not the default, it has the best audio documentation!
http://www.motoslave.net/sugarcube/2/docs/macros.html#macrocat-audio
While Sugarcube is not the default, it has the best audio documentation!
http://www.motoslave.net/sugarcube/2/docs/macros.html#macrocat-audio

Okay, so go back to Twine.
First we have to make "StoryInit"
This will be a loading screen, where we cache our audio. Cacheing the audio, takes it from our harddrive to our RAM. Meaning we can call on it "instantly" from now on.
Click +passage
First we have to make "StoryInit"
This will be a loading screen, where we cache our audio. Cacheing the audio, takes it from our harddrive to our RAM. Meaning we can call on it "instantly" from now on.
Click +passage
Double click on the new passage that has appeared, and name it "StoryInit" capital letters matter!
Here is what to type in
Here is what to type in
"cacheaudio" is the command, "alarm" is what we are going to refer to this as from now on, and "media/alarm.mp3" is the file!
In this page, we are creating two links to [[new pages]] :)
You'll notice that everything you put in [[square brackets]] will create a link to a page called that.
next, we'll do our command "audio" references what sort of command it will be "alarm" references
You'll notice that everything you put in [[square brackets]] will create a link to a page called that.
next, we'll do our command "audio" references what sort of command it will be "alarm" references
Great! So, we'll go to our new pages [[snooze]] and [[turn off]]
Here, we have learnt a new sort of page setup. We want the text to say "again", but go to [[start]] page. So we have the arrow!
Here, we have learnt a new sort of page setup. We want the text to say "again", but go to [[start]] page. So we have the arrow!
Next, to our other new page:
Here you will see that we had to STOP the alarm sound, and PLAY the snore sound :)
Here you will see that we had to STOP the alarm sound, and PLAY the snore sound :)
GREAT! We've finished our first story. Now, we have to build it, to listen to the audio.
Click "publish to file"
Click "publish to file"
And save it in the folder we made in "builds" earlier.
You can now open that HTML doc, and play your text based game in most browsers!
You can now open that HTML doc, and play your text based game in most browsers!