+1 vote
by (300 points)
For my story, I want different dialogue options that lead to individual rooms based on certain variables. I suppose it's kind of like:

(if: $variable is "")[text]

but I want a clickable option. I've been trying to figure out a way to do it, but I know literally nothing about coding and I don't know how to make it work.

Any advice would be great, thanks!

1 Answer

+2 votes
by (156k points)
selected by
 
Best answer

If I understand correctly you're asking how to have conditional links, if so then you just need to include that link within the associated hook of your (if:) macro.

(if: $variable is "some value")[ [[Link Text->Target Passage]]]

warning: due to am exisiting limitation of the Twine 2.x Passage Editor you need to place at least a single space character between the opening square bracket "[" of the (if:) macro's associated hook and the double opening square brackets "[[" of the markup based link.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...