BBCode text: carriage return and adding lines with code

My first question is: the tag [br] for the “carriage return” not working, it’s diferent in GDevelop?

I would like to add lines of text to a BBText object.
I use “Set BBCode Text” with “add” and the definition:

“[center] " + GlobalVariableString(codeline) + " [/center]”

I tried using the “center” tag to solve.
But it doesn’t detect the formatting by rewriting the tags:

[center]Text Here[/center]

What am I doing wrong?

Hi,
Have you tried with the default tags shown when you add the object?
image
I think these are the only supported tags.
A line break is: + NewLine() +

1 Like

Thank you!
NewLine() works!
I have not found any reference to this function…

It’s not specific to the BBCode object, but you’ll find it in the expressions page of the wiki (or inside GDevelop, in the blue buttons next to the fields).
https://wiki.gdevelop.io/gdevelop5/all-features/expressions-reference

1 Like