Okay, so I want to do something along the lines of the following in a Twine story (underlined text denotes links; text between >>and<< is clicked links):
[quote="Your Front Door"]Ah, home sweet home. It's been a while since you came here. The welcome mat is displayed before the >>door<<.
[quote="The Door"]It's your own front door! >>Open it<<?
[quote="Can't open it!"]Mrmmph! It's locked! Oh yeah, you locked this before you left, right? Now where did you put >>that key<<...
[quote="Your Front Door"]Ah, home sweet home. It's been a while since you came here. The >>welcome mat<< is displayed before the door.
[quote="Welcome Mat"]It's a welcome mat. Didn't you put your key under here? Ah yes, it's right here. You make a quick look around and slyly >>pick it up<<.
[quote="Your Front Door"]Ah, home sweet home. It's been a while since you came here. The welcome mat is displayed before the >>door<<.
[quote="The Door"]It's your own front door! >>Open it<<?
[quote="Your Front Door"]With key in hand, you easily open the door. Now that the door's open, you can enter it. The welcome mat is displayed before the door.
Sorry if that was too verbose. Basically I'm trying to figure out how to keep track of variables and such, since I've never really used them before. Thanks for your help.
Comments
You mean this one? (Sharpe has two tutorials, one for Javascript objects and another for CSS.) It looks pretty complicated for what I'm doing, but I'll keep it in mind. As for the sample RPG, I'm not sure I'll need it at all, as this project is more of a very simple adventure game type deal.
However, at this stage in the game, "everyone's" first tutorial might be of more help: http://www.auntiepixelante.com/twine/
Basically, you set variables and you check variables. That's about all you do with them.
To set the variable "$color", do this: To check the variable "$color", use an if conditional branch like this: The operator "eq" means "equal to". You can use "is" or "==" in place of "eq"; they are synonymous and work the same way. So, the conditional branch is "checking" the $foo variable basically by saying, "If the variable '$color' is equal to green, print that the color is green. Elsewise, print that the color is red." Sure, there's a lot more to it, but that's the foundation of variables. Pretty simple stuff once you see it in action.
Also, I made your game real quick. Note that there are about 10,000 ways to create the scenario you proposed. Feel free to ask questions.
Hope that helps!
Would just not giving them the option to do the same action again work?
This example uses "setter links." See here: http://twinery.org/wiki/link Example attached. Note that I used the "nobr" tag on the Start passage, and made whitespace with HTML <br> tags. You'll see what I mean. It keeps from having a "hole" between options after removing them. Also note that you can kick the door repeatedly, but you get a different answer after trying once, which may be what you're seeking. I put a couple more comments in the code as well.
Hope that helps!
<<set $annoyance = 0>>
<<set $annoy_poke = 3>>
<<if $annoyance lte 10 & $annoy_poke gt 0>>[[Poke|here][$annoyance +=$annoy_poke;$annoy_poke -= 1]]<<endif>>
...repeat for different options...