When a link is pressed another one disappears.

0 votes
asked Dec 3 by Nibor_Coding (150 points)

Hello Everyone!

I'm currently working on a story, and would like to make a sort of dialog. So when a link is clicked the other one disappears, so that they only have the option to click continue. 

(set: $disrespect to "Be Disrespectful")
(set: $walkaway to "Be Strong and Walk Away")

(link: "$disrespect")[
	(transition: "pulse")[You Dumbass!] 
]

(link: "$walkaway")[
	(transition: "pulse")[My bad.] 
]

[[Continue]]

  

1 Answer

0 votes
answered Dec 3 by greyelf (43,790 points)
selected Dec 3 by Nibor_Coding
 
Best answer

Try something like the following which uses a named hook to define the area the macro based links appear in, and (replace:) macros to overwrite that area with the relevant transition text.

(set: $disrespect to "Be Disrespectful")
(set: $walkaway to "Be Strong and Walk Away")

|links>[\
(link: "$disrespect")[
	(replace: ?links)[\
		(transition: "pulse")[You Dumbass!]\
	]
]

(link: "$walkaway")[
	(replace: ?links)[\
		(transition: "pulse")[My bad.]\
	]
]\
]

[[Continue]]

... I also used Escaped line break markup to suppress unwanted line-breaks.

commented Dec 3 by Nibor_Coding (150 points)
Perfect! Thank You.
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.
...