Hello all, first time poster here. Been doing some stuff with Twine last couple of months and learning the basics. I have something here that looks like I'm stepping firmly out of 'the basics' though.
The basic idea is that I'm doing a horror story where I want a section of text to change every couple of times they visit the room. There is a qualifier of the player need to reveal the item in question, but that's working fine. The issue I'm getting is finding some way of replacing this section of text in a progressive manor rather than randomly with an (either:) command.
So far the code I have looks something like:
(if: (History:) contains "qualifying passage)[(if: count ((History:), "current passage") >=1)[First text](elseif: count ((History:), "current passage") >=3)[Second text](elseif: count ((History:), "current passage") >=5)[Third text](elseif: count ((History:), "current passage") >=7)[Forth text](elseif: count ((History:), "current passage") >=9)[Final text]]
Now the problem is this way around, it never moves off the first round of text. I'm dried doing it the other way around with <= but then of course they all display at once.
Not quite sure where I can go from here.
Comments
Also I'd recommend storing the 'count ((History:), "current passage")' part in a variable so you don't need to keep typing it out.
note: A startup passage is where you should be initializing (giving a default value) to the $variables used in your story, it is a standard passage that has a startup tag.
In your startup passage initial a counter to zero, you can call the counter whatever you like but I am going to call it $counter for convenience. In the passage with the conditional text: note:
a. I added extra line breaks to make the example easier to read, you can remove them.
b. As this passage will be seen many times you may want to also replace the (History:) contains "qualifying passage" check with a true/false $variable.