Line Breaks
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 5
- Joined: Tue Dec 12, 2006 12:29 am
- Contact:
Line Breaks
Hey I'm just wondering how does one do a line break for this one? I mean I know with HTML you use the <BR> command to make a new line, but how is that done for Ren'Py? Or rather what's the code for Ren'Py?
-
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
-
- Regular
- Posts: 113
- Joined: Sun Oct 08, 2006 1:29 am
- Location: BEHIND YOU!!!
- Contact:
Type \n to get a line break. So:
will display as:
Code: Select all
"This is\ndialogue."
Code: Select all
This is
dialogue.
-
- Newbie
- Posts: 5
- Joined: Tue Dec 12, 2006 12:29 am
- Contact:
- phantmoftheomsi
- Newbie
- Posts: 17
- Joined: Sat Oct 30, 2021 12:57 am
- Completed: None yet
- Projects: A modern adaptation of ancient Chinese crime fiction.
- Deviantart: phantomoftheomsi
- Contact:
Re: Line Breaks
I tried \n and got an infinite loop.
Is this method for a line break still viable? I noticed this post is 15 years old and the engine may have been updated.
Is this method for a line break still viable? I noticed this post is 15 years old and the engine may have been updated.
Re: Line Breaks
It works for me:phantmoftheomsi wrote: ↑Thu Nov 04, 2021 1:00 am I tried \n and got an infinite loop.
Is this method for a line break still viable? I noticed this post is 15 years old and the engine may have been updated.
Code: Select all
"Some words.\nA linebreak"
You should probably look at the text documentation next time instead of reviving a fifteen year old thread lol.
Re: Line Breaks
Sorry for reviving a 16 (!) -year old thread, but "\n" doesn't in fact appear to work inside a custom text tag...I had to resort to a function and ugly syntax to accomplish this.
- neometalero
- Regular
- Posts: 198
- Joined: Sun Oct 23, 2016 3:51 am
- Completed: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
- Projects: My Dream Sport Dating Simulator, Attack Helicopter Dating Simulator
- Deviantart: neometalero
- Contact:
Re: Line Breaks
It works. Here https://www.renpy.org/wiki/renpy/doc/FAQ is the official documentation on that
Be sure to write "\n" and not "/n" , and that it is between two blocks of text, not alone.
Here it's an example:
Code: Select all
#Im using a variable since Im displaying this inside a screen
$diaBatRang="All Station, Charlie here. \nThrowing a Stun grenade, everyone in my vicinity cover your eyes and ears."
#You can even add text.
$diaBatRang=diaBatRang+"\nI only have one stun grenade left. We should make it count. Over."
Re: Line Breaks
You didn't read carefully enough. I said "inside a custom text tag." I know it works in normal dialogue.neometalero wrote: ↑Sat Jan 27, 2024 11:24 amIt works. Here https://www.renpy.org/wiki/renpy/doc/FAQ is the official documentation on that
Be sure to write "\n" and not "/n" , and that it is between two blocks of text, not alone.
Here it's an example:Code: Select all
#Im using a variable since Im displaying this inside a screen $diaBatRang="All Station, Charlie here. \nThrowing a Stun grenade, everyone in my vicinity cover your eyes and ears." #You can even add text. $diaBatRang=diaBatRang+"\nI only have one stun grenade left. We should make it count. Over."
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Line Breaks
Instead of whatever you came up with that you didn't like, have you considered just closing the text tag?
Code: Select all
"words [custom tag]words[/custom tag]\n[custom tag]words[/custom tag]"
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot]