How to align font to the right side?

davesubaru

  • Posts: 79
Default is set to left.
So it goes
10
100
1000.

I want it to go
      10
   100
1000

You will need to {Draw} then set the correct X/Y.

Or you can do this, make and actor with text made from another program {Gimp/Photoshop}

And import it as a picture, then place it where you want.
I'm 17 years old, here to help and Entertain. {Also to make fun games}
ADAM: (http://www.stencyl.com/game/play/25588)
Also, if you need help making a platformer, search {Jumper} in Stencyl Forge. This is a player with everything you need in it, that i made. Enjoy!

davesubaru

  • Posts: 79
You will need to {Draw} then set the correct X/Y.

Or you can do this, make and actor with text made from another program {Gimp/Photoshop}

And import it as a picture, then place it where you want.

Thanks for the response. I'm using a draw score. Would be file size heavy to import it as a picture.
Setting the correct X/Y would just have it in that certain spot right?
What I wanted was the draw text score to align right so the score increases towards the left.
        10
     100
  1000

SanjayPatel

  • Posts: 18
You can use the "get width for "  " as text block to figure out the length of the number you're printing. Just negate this length and use that as the "X" for the draw text behavior.  I attached a stencyl project that should work.

sdieters

  • Posts: 2068
i made a tutorial for a classic style HUD with scores etc. check it our at >> https://www.youtube.com/user/ArtificialStudioInfo

i'm not sure in what part i showed that, but it is there in the 3part tutorial >>
https://www.youtube.com/watch?v=I0m31tMydmk&list=PLDmzonJs5WfnptKHYQMhuKb8OHQQuCXGu
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

gamegirlxl

  • Posts: 713
Right justification would probably be a great feature for Stencyl to have, especially for text written in a language like Hebrew (which is read/written right to left).

Sorry for the long reply:

Importing a large file (Like Text) into a game, can be done.

Just make the background transparent, and compress the picture to save Memory.

I'm 17 years old, here to help and Entertain. {Also to make fun games}
ADAM: (http://www.stencyl.com/game/play/25588)
Also, if you need help making a platformer, search {Jumper} in Stencyl Forge. This is a player with everything you need in it, that i made. Enjoy!

gamegirlxl

  • Posts: 713
Sorry for the long reply:

Importing a large file (Like Text) into a game, can be done.

Just make the background transparent, and compress the picture to save Memory.
I don't think that this would work when it's the SCORE that's being drawn.  If you did decide to make your own system, you'd basically be re-making what you already get from drawing text in the first place.

I'm also not sure why you think that text files are big, unless you're actually referring to images that happen to contain text, which are larger than .txt files, but not necessarily bigger than the average image.

sdieters

  • Posts: 2068
I cover that in the videos I showed above.
You need to draw your text like this:

# = the place you want to end your line.

Draw (text) at X(# - get width for (text) using (font)), Y (desired Y value)
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p