Can I put line breaks in the links? (Twine 2.1.3, Sugarcube 2.18)

0 votes
asked Sep 19, 2017 by Lord_Benson (130 points)
Hello, folks!

I am a total noob trying to write interactive pulp poetry, rather than prose, and am seeking a way to put line breaks inside the links so that they appear as poetic couplets.

For example, there might be a rhyming passage in which a guy catches his gal with another man, and the links/choices should look like this:

****

Enraged, I break her lover's neck and flee,

now all the county's cops are after me.

 

A devastating blow, but I'll be kind,

despite the killer's fury in my mind.

***

Simply hitting "Enter" in the edit screen does not work (no links created), nor does the <br> tag (includes the tag as text). Does markup work inside the links?

This seems like a fairly simple thing - apologies if it's been discussed; I could not find it.

Bottomless thanks!

-B.

1 Answer

0 votes
answered Sep 19, 2017 by Gryphbear (860 points)

Alright. After 'some testing' - you CAN create links. Through the <<link>> macro - BUT... you have to make it into one single line. I'll show you.

<<link "Dwarf on the Wharf,\nAlone by himself\nPining for those who woof." "Passage name">><</link>>

Notice the \n? That's the newline code for Javascript I believe. And the Passage Name you'll just supply where to lead the reader to a new passage  but keep in mind - <<link>> works with \n, and [[ ]] links apparently doesn't. And for using <<link>> macros - you'd have to create the passage manually, since the macro doesn't auto-create Passages once you exit the previous passage.

Hope that helps some? If anyone knows a simpler way to do this - please chime in. Plus I believe you can do \n\n to create a space in between each line.

 

commented Sep 19, 2017 by greyelf (83,470 points)

Another way you could also achieve the same result is by using HTML Attributes like so:

<a data-passage="Name of target Passage">Enraged, I break her lover's neck and flee,
now all the county's cops are after me. 

A devastating blow, but I'll be kind,
despite the killer's fury in my mind.
</a>

,,, you will also need to manually create the target Passage if you use this method.

commented Sep 21, 2017 by Lord_Benson (130 points)
Thanks much, guys! Will try these tips out after a brief vacation.
commented Sep 21, 2017 by Gryphbear (860 points)
Intriguing. I'll try that as well. (Yep, just tried it out. It does let you do it without having to use the \n code. The last one may be a bit simpler, but the Passages do not have any "connector" lines with <a data-passage> code or <<link>> coding. But both work.
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.
...