Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sugarcube Link Formatting Bypass?

edited February 2016 in Help! with 2.0
I'm trying to make a link that has the text:
"I'm [player name], who are you?"

I'm trying to do it by coding:
[["I'm $player_name, who are <i>you?</i>"|Ask Name]] or
[["I'm <<print $player_name>>, who are <i>you?</i>"|Ask Name]]

Those yield, respectively:
I'm $player_name, who are <i>you?</i>
I'm <<print $player_name>>, who are <i>you?</i>

I've tried a few other ways as well. Nothing at all I've tried will give me the quotation marks or resolve the variable or display the italics. Nothing at all except unformatted letters and numbers seem to work inside of a link's text.

How on earth do I do this? There's no way this is a real limit of twine.

Comments

  • One solution is to use HTML Attributes to create your links.

    a. If you want to keep using an underscore in your variable name, then you will need to use a <<print>> macro:
    <<set $player_name to "John">>
    
    <a data-passage="Ask Name">"I'm <<print $player_name>>, who are <i>you?</i>"</a>
    
    b. If you remove the underscore in your variable name, then use can use a naked variable:
    <<set $playerName to "John">>
    <a data-passage="Ask Name">"I'm $playerName, who are <i>you?</i>"</a>
    
  • Thanks! That works
Sign In or Register to comment.