Center Alignment for BBText [SOLVED]

How can I center the Text of the BBText?

Set Base alignment to “center” in the BBText Object or use the Alignment action.

But this only works with 2 or more lines.
If you only have one line, drag the text object with the mouse and want it to be centered there, it doesn’t work. The object is reduced to the actually required size of the text when rendered.

We don’t know what exactly you want to achieve, but you can center the text to another Object.
Center X position action with value button.X() + button.Width()/2

1 Like

So that initial value that I put to my text is 999 because that’s the maximum amount that I restrict in my game. When I put it to the right place, it’s alright. But when I change it to for example 0, it’s not centered anymore.

Like in most arcade games that the score is always in the center (not literally in the center of the screen, it can be where you originally put it) that shows how much your score is.

Yes, because there is nothing where you center it.
Alignment only works inside the text, with more than one line.


Oh. Now I get it. Thanks!:smiling_face_with_three_hearts: