Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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:
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:
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