Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Story choices

edited April 2014 in Help! with 1.x
Hi! I hope I'm not asking a totally redundant question here, but I've searched and searched and unless I completely missed it or something's gone over my head, I don't know if I've found an exact answer.

I'm using Twine to write a project due next week (yikes!), and the general premise is this: The player will have three incidents they will come to in the story. In each of these three incidents, they will ultimately get three choices - a good choice, a neutral choice, and a bad choice (it's not stated flat-out like that, but you get my meaning). The ending they get will depend on if they've chosen a majority "good" (3 good or 2 good) a majority "bad," (3 or 2 bad) or a majority "neutral" (3 neutral or 2 neutral, or if they pick one of each good, bad, and neutral, I'd like the path to lead to the "neutral" ending).

My question is, is this possible? Is there a way to have Twine register how many good, bad, and neutral choices you've made, as it were, and use that to flow into the appropriate ending?

Thank you in advance for any help!

Comments

  • First set up a score variable on the first page (may not be necessary, depending on your header):
    <<set $score=0>>

    Then have that updated when the player makes a choice:
    [[Good][$score += 2]
    [[Neutral][$score += 1]
    [[Bad]]

    If you do that three times, the score can range from 0 to 6. Your result page might go like this:
    <<if $score > 4>>
    Great Score!
    <<else if $score > 1>>
    So-so score
    <<else>
    bad score
    <<endif>>

    That is just the bare bones, but is hopefully enough to get you going.
  • The preceding post has a few typos. It should actually read
    [[Good][$score += 2]]
    [[Neutral][$score += 1]]
    [[Bad]]
    and
    <<if $score > 4>>
    Great Score!
    <<else if $score > 1>>
    So-so score
    <<else>>
    bad score
    <<endif>>
Sign In or Register to comment.