I think I need to set a variable of "visited" to be set to "true" after I visit another room, but I don't understand how to set this or how to get the descriptions in two other rooms to be changed after this variable is set.
Sorry, new to this and using 2.0.11 and harlow.
Comments
At the start I set
Then in each of my rooms that need changing I use?
Then when the player gets to the location I need I use?
a. Only once, after the first visit to the "qualifying passage" by the Reader.
In this case you only need the (history:) check.
b. Multiple times, after each visit to the "qualifying passage" by the Reader.
In this case you will need to track how many times the Reader has visited the "qualifying passage". One way you can do this is to use the (count:) macro to determine how many times the "qualifying passage" appears in the array returned by the (history:) macro.
warning: The array returned by (history:) gets larger each time the Reader navigates from one Passage to another, this causes things like contains and (count:) to take slightly longer to determine their result each time the array grows.
Eventually this delay may become noticeable by the Reader, if this occurs then you may wish to replace both A and B with a solution like the following that uses a variable instead.
1. Initialize the $counter variable.
I suggest doing this in a startup tagged passage, but you could do it in your story's first passage as long as that passage is not the one you need check the value of $counter in. 2. Increment the $counter variable in the "qualifying passage" 3. Determine what to show based on the $counter variable:
3a. Only once, after the first visit to the "qualifying passage" by the Reader. 3b. Multiple times, after each visit to the "qualifying passage" by the Reader.
does both the "+" and "=" have to be present?
The addition assignment operator (+=) is a short-cut that can be used to replace the standard $variable = $variable + value expression. There is also a subtraction assignment operator (-=)
Thank you for explaining that, it works now. just need to work on a score system that will show a different ending based on the score and I am sure that I spotted that answer somewhere.