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:
A few old posts said "Sentence 1." & newline & "Sentence 2." but I was unsuccessful with this method.
Link to other discussion pertaining to same:
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:
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.
Develop games in your browser. Powerful, performant & highly capable.
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