How do I make a link dissappear when clicking it or another?

0 votes
asked Jan 1 by Copyright_Invalid (560 points)
edited Jan 1 by Copyright_Invalid

Let's say I have two links

"link1" link one "link2"

and I click link1, now link1's content shows up on the screen.

Currently, this looks like:



link1content   link2|||


When I want it to look like:


link1 content|||

with link1 and link2 disappearing, but only those links.

How would I do that without going to a new passage?

1 Answer

0 votes
answered Jan 1 by greyelf (73,430 points)
selected Jan 1 by Copyright_Invalid
Best answer

You wrap the links within a named hook and then use the (replace:) macro to replace the links with the content of the selected link.

Some content.

(link: "link1")[(replace: ?links)[Content of link 1]]
(link: "link2")[(replace: ?links)[Content of link 2]]


commented Jan 1 by Copyright_Invalid (560 points)
That's why I couldn't figure it out...

...I haven't been the best with nametags
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.