+1 vote
by (190 points)
I want players to be able to click on one of four lines of text. Once they've clicked on one, I want the other lines of clickable text to be removed and more text appears, relating to the line they clicked on. I had a rather inelegant way of doing so that involved a TON of individual pages but there must be an easier way.

1 Answer

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

The following is one method you can use to do what you asked.

It uses a named hook (links) and the (replace:) macro to remove the non-selected lines of text, and hidden hooks (reply1, reply2, reply3, & reply4) combinded with the (show:) macro to control the revealing of the text related with each selectable line. The following also uses Collapsing Whitespace markup and HTML br (line-break) elements to control the formatting of the page.

|links>[{
	(link: "First line of selectable text")[
		(replace: ?links)[First line of selectable text]
		(show: ?reply1)
	]
	<br>
	(link: "Second line of selectable text")[
		(replace: ?links)[Second line of selectable text]
		(show: ?reply2)
	]
	<br>
	(link: "Third line of selectable text")[
		(replace: ?links)[Third line of selectable text]
		(show: ?reply3)
	]
	<br>
	(link: "Forth line of selectable text")[
		(replace: ?links)[Forth line of selectable text]
		(show: ?reply4)
	]
}]

{
|reply1)[
	Text related to first line.
]
|reply2)[
	Text related to second line.
]
|reply3)[
	Text related to third line.
]
|reply4)[
	Text related to forth line.
]
}

 

by (2.3k points)
Can links to other passages within each line be shown too on that?
...