I don't have much coding experience and I'm sort-of learning as I go. I'm using Harlowe format.
The player has the option of interacting with 3 different people - Person A, Person B, and Person C. For each of those people there are 3 possible interactions - two of these interactions will fail, one will succeed. When the player fails, they end up at a passage titled, for example, "PersonAfail". This passage gives the player the option to try again with whoever is remaining (if anyone).
The bit I'm having trouble with is this. Say you interacted with Person A first, failed, ended up at the fail passage and had the option of trying again with Person B or Person C. I have a piece of text offering that option. But if you already played (and failed) Person B, then tried Person A (and failed again), you only have one option left - in which case, I have a piece of text offering the one remaining option [[Person C]]. Or vice-versa if you already tried Person C and only have Person B remaining. Plus a final piece of text if all three interactions have been attempted and failed, in which case the game is over.
I thought I could use the if: macro to alter the available options in the 'fail' passage, but I'm not sure the best way to do it. At the moment my code for "PersonAfail" reads like this:
(if: (history:) contains “Person A”)
[There are two remaining:
[[PersonB]]
[[PersonC]]]
(elseif: (history:) contains “PersonBfail”)
[There is one remaining:
[[PersonC]]]
(elseif: (history:) contains “PersonCfail”)
[There is one remaining:
[[Person B]]]
(else:)
[There are no people left!
[[Final passage]]]
Which obviously doesn't work, because in order to arrive at "PersonAfail" you had to pass through the "Person A" passage, which means the first hook ("There are two remaining") is always visible. So what macro do I need to use, and how, in order to alter/reduce the player's options as they play through the game?
I know I'm probably overcomplicating this.