ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

Variables and Conditions

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

  • 2 years ago
  • 70
ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!