I saw this code on another discussion and I really like it:
|choices>[[The Blue Pill]<opt1|
[The Red Pill]<opt2|
]
(click: ?opt1)[
(set: $pill to "Blue")
(replace: ?choices)[The Blue Pill]
]
(click: ?opt2)[
(set: $pill to "Red")
(replace: ?choices)[The Red Pill]
]
So I added some other things to test it out.
Passage 1: pill choice
"You have a choice. You can take the blue pill or the red pill."
|choices>[[The Blue Pill]<opt1|
[The Red Pill]<opt2|
]{
(click: ?opt1)[
(set: $pill to "Blue")
(replace: ?choices)["Ah, the blue pill. That is fine, and you may learn the limits of your life force as you strive to do good!"][[Okay|okay]]
]
(click: ?opt2)[
(set: $pill to "Red")
(replace: ?choices)["Ah, the red pill. That is fine, and you may learn the exciting yet destructive forces of chaos!"][[Okay|okay]]
]}
Passage 2: okay
"Farewell, my friend."
I really like the way this works. Is this still a good way to do it or are there improvements that could be made?