Howdy, Stranger!

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

Twine 2/Sugarcube conversation question

edited November 2015 in Help! with 2.0

Here's another question for you all. What if I want a player to cycle through five different pages, being able to choose the order in which they're read, but not be allowed to move onto the rest of the story until all five of those pages are read?

Specifically, I want the player to be able to ask a character in the game five questions in any order but for a new "on with the story" link not to appear until all five questions have been asked (link would appear beneath the fifth passage selected I'm assuming. Or beneath any answers which are reread via clicking on old questions after that point.)

My only real issue is how to create that final link. In terms of connecting the questions or allowing a random order I just listed the four remaining question-links beneath each of the five answers, and am not worried about making already-asked questions disappear. The answers contain a lot of story-related info and I would like to allow players to reread them if they're so inclined.

Thank you!


  • edited November 2015
    I'm assuming this is for SugarCube 1.x.

    The answer depends on how you're implementing the questions and answers.

    As an example, one way you could do it would be to have a question hub passage, which would link to each of the actual question passages and would also check if the questions had been answered. Each question passage would have the question itself and a list of response links. The answer check would simply use the lastVisited() story function to check if the various question passages had ever been visited.

    Question Hub:
    Blah, blah… answer these questions… blah, blah.
    * [[Question 1]]
    * [[Question 2]]
    * [[Question 3]]
    * [[Question 4]]
    * [[Question 5]]
    <<if lastVisited("Question 1", "Question 2", "Question 3", "Question 4", "Question 5") gt -1>>
    [[On with the show]]
    Question 1: (the others would be similar in that the answers return you to the hub)
    Do you like pie?
    * <<click [[Yes|previous()]]>><<set $likesPie to true>><</click>>
    * <<click [[No|previous()]]>><<set $likesPie to false>><</click>>
  • Perfect. Thank you very much. That was really bugging me.
Sign In or Register to comment.