Howdy, Stranger!

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

Removing whitespace

So, attempting my first interactive story here and I'm having some trouble with the formatting. Is there a way I can get text to always be at the top of the page without white spaces occurring when I'm using variables? Like in this bit here. Each line gets progressively lower on the page each time it cycles and it bugs the heck out of me. The space between the text and the links is intentional, but having each one shift down by a line isn't.

(if: $sleepvar is 0)[
[...]<var|]

(if: $sleepvar is 1)[ Beedlebeedlebeep. Beedlebeedle beep.

[Zzz...snrt...?]<var|]

(if: $sleepvar is 2)[ Beedlebeedlebeep. Beedlebeedle beep.

[Gwuh? Wha?]<var|]

(if: $sleepvar is 3)[ Beedlebeedlebeep. Beedlebeedle beep.

dadcall ]

(click: ?var)[(set: $sleepvar to $sleepvar + 1)(goto: "...")]

Comments

  • You need to state which story format you are using, as answers can be different for each one. Based on the syntax of the macros in your example I am going to assume you are using Harlowe.

    The extra lines are due to you adding line-breaks between parts of your passage contents, and there are two things you can do to reduce them.

    1. Wrap content within a set of {} curly braces, they will remove some of the line-breaks from the content within them:
    {
    (set: $var to "value")
    (set: $var2 to "value2")
    }
    

    2. Manually remove the extra line-breaks:
    (if: $sleepvar is 0)[[...]<var|](if: $sleepvar is 1)[ Beedlebeedlebeep. Beedlebeedle beep.
    
    [Zzz...snrt...?]<var|](if: $sleepvar is 2)[ Beedlebeedlebeep. Beedlebeedle beep.
    
    [Gwuh? Wha?]<var|](if: $sleepvar is 3)[ Beedlebeedlebeep. Beedlebeedle beep.
    
    [[Oh god.|dadcall]] ]
    
    (click: ?var)[(set: $sleepvar to $sleepvar + 1)(goto: "...")]
    
  • edited June 2015
    That does help, but there still seems to be a tiny little letter-sized bit of white space at the very beginning. Less annoying and something I can deal with, but still poking at my OCD.

    Thanks for the help though!
  • Yes. Also, there's no need to test a $variable whose value is a boolean against against the boolean literals, simply use the $varaible in those cases. For example:
    (if: $hasRedKey and $hasBlueKey)[…]
    
  • edited June 2015
    Oh, also, while I'm here, there's a particular point where I type " Population: 2100. It's located..." For some reason, this becomes

    Population 210
    1. It's located...

    Like it's trying to start a list of items.

    And is there a way to get Harlowe to look like Sugarcube? I like the look but think writing the actual code and stuff in Harlowe is easier.
  • It IS trying to start a list. That's the way the mark-up language works. You could use a comma in a pinch... :)
  • Just a comment that there are several issues related to whitespace that are being fixed for when Harlowe 1.1. comes out.
  • Just a comment that there are several issues related to whitespace that are being fixed for when Harlowe 1.1. comes out.
    Agreed. The list issue is fixed in 1.1 as far as I can tell, and attempts to get rid of white space seems to work much better in the beta. You can also use back slashes ('\') to get rid of a line of white space. That should help get rid of the last niggling lines of it.
Sign In or Register to comment.