How do I add a carriage return line feed (aka page break) to sprite font text?
I was looking here and didnt see the answer:
construct.net/en/make-games/manuals/construct-3/plugin-reference/sprite-font
A few old posts said "Sentence 1." & newline & "Sentence 2." but I was unsuccessful with this method.
Link to other discussion pertaining to same:
construct.net/en/forum/construct-3/how-do-i-8/paragraph-sprite-font-132567
Thanks.
Gillis
Develop games in your browser. Powerful, performant & highly capable.
newline should definitely work if you use it in "Set text" action.
If you want to set text in editor (on the left tab), use \n to start a new line:
Sentence 1\nSentence2
Thanks. I think the problem is I am trying to have a giant array of text and adding the newline there may not be supported... say "line1. newline line2." as the array string does not work when passing that from the array to the sprintfont text. It seemingly ignores the newline. I will try the command you suggested. Thanks.
You can add some character or a custom tag, and then replace it with newline. For example:
Variable s="Some text.#Some more text.#The end." SpriteFont Set text to replace(s, "#", newline)
Thanks! this works