Hello,
So I have just started using Twine for my story and I wanted to know if a thing is possible, been trying to achieve it for few hours now.
Suppose in my game, I ask a question to the user which has 4 reply choices - A, B, C & D.
The user selects choice B.
Now, in my next question, there are again 4 choices (E, F, G, H) out of which 3 are generic but I want the 4th one (H) to be changed according to whatever choice the user chose earlier.
So what I have done is, I have created a total of 7 choices for this question - E, F, G are generic choices and H1, H2, H3, H4 which are linked to A, B, C & D respectively. So if the user selected the choice B in previous question, I wish to show E, F, G, H2 as choice options in the next question. How do I achieve this? Do you get what am I trying to say?
Comments
You can use variables to track the Reader's choices and then change what is shown to them based on the value of the variable.
1. A passage named Question 1
Use a (link:) macro combined with a (set:) macro and a (go-to:) macro to show a link that first assigns a value to a $variable and then moves them to the next passage when the link is selected. This type of link is generally known as a Setter Link.
2. A passage named Question 2
Use an (if:) macro or the related (else-if: ) macro and (else: ) macro to check the current value of the $answer1 variable to determine which Setter Link should be shown.
The following includes Collapsing whitespace markup to stop an extra line break appearing between choice G and whichever H link is shown.
Here's what I wrote for my 1st question passage:
And here's what I wrote for my 2nd question passage: The problem is, whenever I go to the 2nd passage, it doesn't show me the options as per my last answer and automatically goes to the "Easy" passage whenever I load this passage. What am I doing wrong?
Because you are sending the reader to a different passage for each link there is no way the $tclass variable in the target passage can have more than a single value.
eg. In your Are they even trying? passage $tclass1 will always equal "A", in your Easy test passage $tclass1 will always equal "B", etc...
What is the name of this second passage, is it the Are they even trying? passage, is it the Easy test passage or is it the Ms. Susan passage?