So I've run into a little problem in my game. There is a section where two characters are talking and 4 options pop-up for the player to choose from e.g.
[[Argue point 1 - she is right]]
[[Argue point 1 - she is wrong]]
[[Argue point 2 - she is right]]
[[Argue point 2 - she is wrong]]
Problem one: how do I get the player to be able to see all the choices in that one passage, and once they have made a choice for any of the options, have the alternate choice link disappear e.g. if player chooses
Argue point 1 - she is right then the text associated with that passage shows, while
Argue point 1 - she is wrong disappears completely.
Note: I would want choice 1 text to stay permanently then on that passage.
Then the player can move on to
Argue point 2 - she is right and so on...it doesn't matter in which order they choose Argue points. They could start with 1 or 2 or 3 or 4.
Problem two: I also need a variable set on each of these choices based on the total points you have collected with the girl character. You have been collecting points using:
{(set: $pa +=1)}
So now in this new passage with many choices, I want to be able to increase or decrease your total points with her based on your choice e.g if you choose
Argue point 1 - she is right you go up +5 points with the girl.
Problem 3: Once the player has made all his choices on this one passage, can see all of his choices displayed, has scored a certain number of points with the girl character based on the choices, he either gets one response from the girl (if $pa >x) or another response from the girl ($pa <x).
Note: The girl's response would be cumulative of what has happened in the story, not what just happened in the choices in this one passage.
Comments
a. The following examples will include indenting and extra line-breaks to make them more readable, this will cause unwanted white space between the Argue points. Removing the extra line-breaks will will reduce the unwanted white space.
b. The following examples includes $variables to track which Argue points were selected and the points with the girl, these $variables need to be assigned a default value before the Passage containing the Argue points is shown. I will be using a startup tagged passage to do this and it will contain the following.
re: Problem 1.
The following passage allows the selection of four Argue points, notice that the main difference between the code for each of the right/wrong argue point is the name of the $variable and named hook used (eg. point1 vs point2)
re: Problem 2.
You can add a (set:) macro to the hook of each (link:) macro to change the amount of girl points assigned. So the code for the first Argue point would look something like the following, you can change the code for the second to forth Argue points yourself.
re: Problem 3.
The solution to this is a little more complex because you need to check the current values of all the $point related variables each time the Reader makes a selection. You could use a (live:) macro to do this but I went with the (display:) macro method.
a. Create a new passage named Check Selections and place the following in it, it checks the current value of the related variables and uses a (replace:) macro to output the relevant text to a named hook (which will be in the Argue points selection passage)
b. Change each of the (link:) macros to (display:) the Check Selections passage, the code for the first Argue point would look something like the following, you can change the code for the second to forth Argue points yourself.
c. You need to add a named hook so that the (replace:) in the Check Selections passage has somewhere to output the relevant text to. Add the following named hook to the end of the Argue points selection passage.