Howdy, Stranger!

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

Like but with passage title included?

I want to call a passage from another passage, exactly like <<display>>, but with the "display"-ed passage's title included.

The idea is for the flow of text to be somewhat reminiscent of the feelparser text adventure games, where you *do* something, the game tells you what happens, and then it tells you, figuratively, "well, here you are still" by displaying the name of your current location again.

I don't specifically want that same behavior as a parser game, I just want to convey a similar feeling by being able to display a passage with its title included, when I choose to.

Is this possible?

Comments

  • Something like this?

    !The Great Hall
    <<display The Great Hall>>
    If you want to avoid repeating the passage name, you could make a custom macro for it, or use SugarCube and make a widget for it.
  • That's almost exactly what I ended up doing. In Jonah, "!" was waaaay too big, and the other headings were not right either, so I went with:
    <strong style="font-size:1.4em;">The Great Hall</strong>
    <<display The Great Hall>>
  • You can also change the appearance of <h1> (which is generated by "!" at the start of the line) using CSS:

    :: My style [stylesheet]
    h1 {
    font-size: 1.4em;
    }
    (the "::" line is Twee syntax, in Twine you should add the "stylesheet" tag the passage that contains CSS)

    That way, there is a single place which determines the style, which is very useful if at some point you decide you want slightly smaller or larger fonts.
  • Thanks; I will do that. :)
Sign In or Register to comment.