So, I have set a variable called $randomPassage to one of six passages (listed below). Each passage below is associated with a quest line. I have another boolean variable for each quest (e.g. $squirrelComplete) to designate whether or not a quest line has been completed. Once the quest line is completed I would like to remove the passage from the either macro... but I'm at a loss for ideas... any ideas would be mucha appreciated!
(set: $randomPassage to (either:"squirrel","BoynRock","SnowLeopard","MountPerson","MountGoat","Pinetree"))
Comments
You'd make a function that returns string values if your boolean quest line completed variables are true. then assign either() to that function.
Either:function(q1,q2,q3,etc)
I don't know the syntax to do this however.
note: My example assumes that you are setting up boolean variables like the following somewhere in your story.
You can use an array and (if:) macros to build the list of options that the (either) macro will choose from. ... you can then use special ... operateor documented in the Array Data of the manual to use the $options array with the (either:) macro.
Then, go through all your booleans in turn and add the corresponding quest to the list:
Any quest that you've done already will not get added to the list. When you're done, just select randomly:
(set: $randomMountPassage to (a: "squirrel","BoynRock","SnowLeopard","MountPerson","MountGoat","Pinetree"))
(if: $squirrelQuest is true )[(set: $randomMountPassage to it - (a: "squirrel"))]
(if: $snowLeopardQuest is true )[(set: $randomMountPassage to it - (a: "SnowLeopard"))]
(if: $parkRangerQuest is true )[(set: $randomMountPassage to it - (a: "MountPerson"))]
(if: $mountainGoatQuest is true )[(set: $randomMountPassage to it - (a: "MountGoat"))]
(if: $pineTreeQuest is true)[(set: $randomMountPassage to it - (a: "Pinetree"))]
(if: $boyRockQuest is true )[(set: $randomMountPassage to it - (a: "BoynRock"))]