Variables and Conditions

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

this is probably going to be the hardest week of the course: Programming.

I promise you that it’s not actually as bad as it seems, but I’ll do my best to make sure that you have enough examples to work from. I’ve actually attached an html file to this module, which you can download and open up in Twine to see some examples of how to use variables. The examples in the file are a bit silly, but hopefully you can see how to set up your variables and conditions and how those get integrated into your stories. Regardless, if after reviewing the material, you are still having trouble understanding how to implement variables and conditions, please make an appointment with me. In most cases, it’s easier for students to understand these concepts if I can explain them in person.

Anyways, a few notes:

  • Think of variables as “containers of information”. What information or data do you need to keep track of in your story? This info could be anything: keys, steps, time, dog toys, flowers, # of text messages, etc.
  • Once you have that, you “set” your variable like so: (set: $steps to 1).
    • You’ll notice that if you’ve done it correctly, the whole line will change color. If you finished typing and it didn’t change color, then something is amiss.
  • Twine reads variables and conditions in the order in which they appear. So if you (set: $steps to 1) at the beginning of the passage, and then (set: $steps to 3) at the end of the passage, the value of $steps will be 3 as you move to the next passage.
  • Following the example above, if you want to keep track of how many steps a player has taken, remember that Twine won’t necessarily know what the incoming value is from the previous passage. So to account for that, you’ll write it like this: (set: $steps to $steps + 1). This will add “1” to the value of whatever $steps was. So if $steps was 5 at the end of the previous passage, it will be 6 after this line.
  • Overall, it will be easier to start thinking of this project more as a video game, and less as just a story. Hopefully at this point, after playing through at least the first two episodes of your TellTale game, you can see how variables and conditions might be applied to a story like yours.

Download

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our Guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Online Class Help Services Available from $100 to $150 Weekly We Handle Everything