So...
I've been using radiobuttons quite frequently, and they're great to establish variables. But I came across a question. It's not a structural problem to my game, just a whim, but I got curious. So here goes: is it possible to have a radiobutton establish a variable and unlock a hidden content of the same passage it's in?
I'll explain better.
I have this in my passage, for example,
* Beer <<radiobutton "$meal" "beer">>
* Mead <<radiobutton "$meal" "mead">>
* Ale <<radiobutton "$meal" "ale">>
<<linkreplace ">>">><<goto "Next">><</linkreplace>>
Now my question, my intention was that the <<linkreplace>> only appeared once the player had made a choice. Now I imagined that could have something to do with a refreshing of the passage itself but I don't know how to incorporate that with the radiobutton macro.
Is this possible? Thanks
(and sugarcube 2.18/twine 2)
Comments
Markup TIP: Wrap the <<radiobutton>>, or <<checkbox>>, and its label within the <label> tag. It makes the included text also activate the radiobutton, or checkbox, when clicked on.
JavaScript (Twine 2: goes in Story JavaScript; Twine 1: goes in script-tagged passage)
NOTES: