Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Text formatting: line breaks

A topic by ChristopherMerriner created Jun 19, 2020 Views: 320 Replies: 6
Viewing posts 1 to 5

This must be obvious,  but I can't figure it....how do I create line breaks? For instance, if I want to print a title in the centre middle of the screen (I know how to centre text) or if I just want to print a title, and the next paragraph a few lines beneath?


LIKE




this.


?

Submitted (2 edits)

print "LIKE\n\n\nthis.\n\n?";
Does that answer your question?
Adventuron User Manual: 2.19.9. Escape codes.

Yes, that's it. Thank you!

Submitted

If you want a space between paragraphs, you can use multiple :print""; statements (an empty string is valid) or use :print "\n\n\n"; as Auraes said.

If you don't want a space between paragraphs (like in a list of items), you can use "print"^n^Item 1\nItem 2\nItem 3^m^"; The first escape sequence suppresses spacing between paragraphs. The last escape sequence returns you to normal.

(1 edit)

Noted, thanks Garry.

Empty :print"" statements didn't generate blank lines for me, but multiple \n did give me what I wanted.

Chris: This could be made more explicit in the manual, for simple folks like me who don't immediately know what an 'escape code' is.

Submitted

Golly, gosh. You're right about the empty string doing nothing. I could have sworn that I'd used that somewhere. I must have been mistaken. Sorry about that.

(1 edit)

Not to worry. It falls into the large category of things in life that feel as though they should work, but in reality don't.