[solved] How do I get multiple empty spaces between two text processor commands?

Curt A. P.
22 Mar 2018, 22:15

So, I have this centered message.

Please choose! 

{command:option1:One}          {command:option2:Two} 

But no matter how many empty spaces I put between the two commands, it keeps printing like this:

Please choose!

One Two

...No empty spaces between the two commands...


XanMag
22 Mar 2018, 22:24

There is a really hacky way to do it. Hacky is typically the only way I know how to code.

_________________

OMG!! It's WHITE font!

Choice 1!________________Choice 2!

Go ahead and highlight the white space above this message. HACKY ACHIEVED!!

<font color = "red">__________________</font>

<font color = "white">OMG!! It's WHITE font!</font>

<font color = "white">________________</font>

You can use that last line of code to create spaces.

There is a more elegant way to do it. I think. But I don't know the proper code to put in there! lol


XanMag
22 Mar 2018, 22:31

Choice 1                                                    Choice 2

Choose 1 &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Choose 2

There is also this HACKY method!! There has to be a way to do more than 1 space at a time though, right?? C'mon, coders! ;)


XanMag
22 Mar 2018, 22:35

Choice 1                 Choice 2

Choice 1 &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;Choice 2

The &emsp; ... the 'm' creates roughly 4 spaces whereas the 'n' is a normal space. Who knew? Haha.

Now the ensp and the emsp I've never used to create spaces. I have used the white font trick.
Good luck!


Curt A. P.
22 Mar 2018, 23:22

Hm, this game don't have a white, one colored background. It's a light seagreen fainting into wheat...
Next question, can I put all colors quest is offering into the html color code? (I know this wouldn't help with the fainting background color either.)

I try the last three ways...


XanMag
22 Mar 2018, 23:38

I believe so!
I believe so!
I believe so!
I believe so!
I believe so!

https://www.w3schools.com/colors/colors_hex.asp


Curt A. P.
23 Mar 2018, 00:10

Nice and thanks for this useful chart.

I've tested &nbsp, &emsp and &ensp. All three created a linebreak instead of a space. Even if I used each code just once.

Then I tried to make a string attribute containing six spaces.

game.sixspaces = "      "
PrintCentered ("Please choose!<br/>{command:command_one:One}" + game.sixspaces + "{command:command_two:Two}< br/><br/>")

...but it printed just a single space. Then I tried to type that value multiple times.

game.onespace = "      "
PrintCentered ("Please choose!<br/>{command:command_one:One} " + game.onespace + " " + game.onespace + " " + game.onespace + " " + game.onespace + " " + game.onespace + " {command:command_two:Two}< br/><br/>")

...and even this printed only one empty space. -


DarkLizerd
23 Mar 2018, 02:28

Sounds like Quest trims printed text...
There may be a way around this...
How about inserting a word between commands:
{command: option1: One } or {command: option2: Two }
And, no, the extra spaces did not work

I posted here about formatting numbers, even Roman Numerals...
I think I had a way to print spaces too...
Like space(10), will print 10 blank spaces...


XanMag
23 Mar 2018, 02:38

I think HTML does that? Either way.

I tested &emsp ; and it worked just fine for me. I am testing in text adventure not gamebook and I also just tested text, not text processor if that makes any difference.


Curt A. P.
23 Mar 2018, 02:52

Yes, only with normal text. With the text processors it keeps doing a linebreak instead... in centered and normal messages.

Is there a way to set a justified alignment?


Curt A. P.
23 Mar 2018, 03:07

How about inserting a word between commands:
{command: option1: One } or {command: option2: Two }

Only for the format. Then the choice should be...

Do you choose One or Two?


mrangel
23 Mar 2018, 03:27

How about:
OneTwo

(that's <img style="width:6em;"/> to create a 6cm space. You can specify distances in cm, in, pt (points), px (pixels), %, em (width of a letter 'm'), en (width of a 'n') or a handful of other odd units)

Or:
Like this, if I type more than one space, they all appear

(Created using the code: <span style="white-space: pre-wrap;">text goes here</span>)
(This last method, "pre" means that spaces appear as spaces but long lines of text will cause a horizontal scrollbar instead of wrapping, "nowrap" means that any number of spaces gets reduced to one, and "pre-wrap" means that spaces appear as spaces, but word-wrap works as normal)


K.V.
23 Mar 2018, 06:07
PrintCentered ("Please choose!<br/>{command:command_one:One} " + Spaces(4) + " {command:command_two:Two}<br/><br/>")

image


DarkLizerd
23 Mar 2018, 06:49

Well... I was close... Spaces()... not space()


Anonynn
23 Mar 2018, 09:07

Aww...I missed a text processor question. I abuse that particular function! :P

Anonynn.


Curt A. P.
23 Mar 2018, 13:13

Nice...
Spaces (6) did the job. I struggled a while because I typed " + spaces (6) + " which caused a error.


laubwolf
23 Mar 2018, 13:29

So much creativity, stomped by a simple Spaces() command :)


K.V.
23 Mar 2018, 18:41

These also work:

PrintCentered ("Please choose!<br/>{command:command_one:One} &emsp; {command:command_two:Two}<br/><br/>")

image


PrintCentered ("Please choose!<br/>{command:command_one:One} &nbsp;&nbsp;&nbsp;&nbsp; {command:command_two:Two}<br/><br/>")

image


PrintCentered ("Please choose!<br/>{command:command_one:One} <font color = '"+game.defaultbackground+"'>__________________</font> {command:command_two:Two}<br/><br/>")

image


PrintCentered ("Please choose!<br/>{command:command_one:One} <img style='width:6em;'/> {command:command_two:Two}<br/><br/>")

image


PrintCentered ("Please choose!<br/>{command:command_one:One} <span style='white-space: pre-wrap;'>      </span> {command:command_two:Two}<br/><br/>")

image


game.sixspaces = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
PrintCentered ("Please choose!<br/>{command:command_one:One}" + game.sixspaces + "{command:command_two:Two}<br/><br/>")

image


XanMag
23 Mar 2018, 21:16

Look at you, KV. Gettin’ all codey on us and shizz...


K.V.
23 Mar 2018, 21:25

I thought it only fair to show that all the codes that were suggested would do the trick.


XanMag
23 Mar 2018, 21:34

No harm, no foul. I lash out because I'm jealous. Haha. Love you!