Howdy, Stranger!

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

How to Remove Blank Space/Hidden Text?

edited December 2015 in Help! with 2.0
I am sorry if this has been answered 20 times before, but I couldn't seem to search the right terms to find it...

Fairly frequently I write a passage in which several things can happen, based upon conditions that need to be met or random chance. For example: If rolled 1, show "TEXT". If 2, show "OTHER TEXT". However, if Roll 2 occurs, the player sees a blank space at the top of the passage equal to the size of the hidden text that would only be revealed if Roll 1 occurred.

How can I shore up blank space/hidden text?

Edit: I found out not long after posting that bracketing the entire condition section reduces said entire section into 1 line of space if the conditions were not met. However, if you have several possible condition sections in a single passage in a row, that adds up to 1 blank line per bracketed/hidden section. So you can still end up with, say, 5 blank lines before any text (with its conditions met) appears. Is there any way to shore that up?


  • You need to state which story format you are using, as answers can be different for each one. Based on your "bracketing the entire condition section" statement I am going to assume you are using Harlowe.

    All the story formats automatically convert each line-break you add to the contents of a passage into a HTML br element, and each story format has it's own method(s) to helping you reduce/remove extra line-breaks. The simplest method that works for all story format is to use less line-breaks in the passage contents.

    As you have already found out, Harlowe method is to wrap content in open { and } close curly braces, this tells the engine in Harlowe to wrap the generated HTML content in a tw-collapsed element and to remove all line-breaks found.
    {(set: $var to "value")
    (if: $var is "other value")[
    This text should not appear.
    This text should appear,
     it should be on the first line of the passage and
     it should appear as one line that may wrap.
Sign In or Register to comment.