Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Blue Squirrel's Twine Game Tutorials, Part 5
Hello, and welcome to my Twine tutorial series. I'm Blue Squirrel. I've been writing interactive fiction since the days when the best tool for it Inform 6, and I'm hoping that with these quick tutorials, you can get started writing them too!
First things first, if you are seeing this as a HTML game, that's great. Feel free to poke around and see how the game looks. When you're ready, save the page as a file using CTRL-S on your browser.
Then, download Twine from https://twinery.org/ and open this file in there, to get started editing and changing the game.
Tutorial 5: Link Appends
Welcome to part 5. We've seen a lot of ways to set variable and make gameplay effects now. For this tutorial, I'll be showing you a slightly different way to use your clickable links.
[[Goblin Town]]In previous tutorials, any time we clicked a link, it would take us to a whole new passage, and remove what was there before.
What if we don't want to do that, and we just want to add more information? That's where linkappend comes in.
When we use a linkappend, we define a clickable link. Then, when it's clicked, it puts a new line under it.
Try it now by looking around <<linkappend "this town.">>
Goblin town is an underground town for goblins.
I'm just going to set a quick variable for later
<<set $orc to 0>>
You can even put links or do variables inside the linkappend. Let's try that in the next path.
[[Talk to a goblin]]You find a goblin to talk to.
<<linkappend "What is your name?">>
You ask the goblin his name, and he says Gob.
You can even have linkappends INSIDE link appends! This can get hard to keep track of fast, but lets you do branching conversations:
<<linkappend "What is goblin town like?">>
He says it's good apart from the orcs.
<<linkappend "The orcs?">>
He says the orcs are jerks.
You can include paths in a link append:
<<linkappend "Can I kiss you?">>
You ask permission to kiss Gob, and he tells you if you do, you'll become a goblin too.
And you can change variables. If you click this one, we'll change the orc variable to 1:
<<linkappend "Ask him if he knows any magic">>
He says the orcs told him to say this if he saw any humans. "Zim zoop zorble!". You suddenly feel very odd inside.
<<set $orc to 1>>
[[Let's finish up]]You kiss Gob, and quickly find yourself shrinking and turning green. You start a goblin family with him and are very happy.
Well, that's it for this tutorial. Link appends can add a lot of polish to your story. Try using them for clickable environment objects that give more descriptions, or chats, or anything really! See you in the next part!Let's just make that previous conversation have a possible effect:
<<if $orc == 0>>
You leave the town and carry on with your adventure.
As you try to leave, you suddenly find yourself growing huge and muscular. You skin turns green as you become a dumb, angry orc!
Well, that's it for this tutorial. Link appends can add a lot of polish to your story. Try using them for clickable environment objects that give more descriptions, or chats, or anything really! See you in the next part!