【Solved】How to start a new line before character speaks?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

【Solved】How to start a new line before character speaks?

#1 Post by nanashi »

Hi. I know we use "\n" to start text with a new line.
But how do we start new line before character speaks?

Below is what I'm looking for.
    Testing.

John "Hello world!"
If I write this way,

Code: Select all

a " Testing."
john "\n Hello world!"
it comes out like this.
    Testing.
John "
    Hello world!"
I'm sorry, I looked up for old threads but found nothing.
I need some help.
Last edited by nanashi on Wed Sep 21, 2011 12:38 pm, edited 1 time in total.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to start a new line before character speaks?

#2 Post by Aleema »

This sort of writing is best suiting with NVL mode. Are you using NVL characters?

nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

Re: How to start a new line before character speaks?

#3 Post by nanashi »

I am.
Here's my code for the character.

Code: Select all

$ char = Character(povname, image="protagonist", kind=nvl,ctc=anim.Blink("system/screen/arrow.png"),what_outlines=[(1.5, "#000") ])

KimiYoriBaka
Miko-Class Veteran
Posts: 636
Joined: Thu May 14, 2009 8:15 pm
Projects: Castle of Arhannia
Contact:

Re: How to start a new line before character speaks?

#4 Post by KimiYoriBaka »

have you tried putting the "\n" at the end of the previous line?

nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

Re: How to start a new line before character speaks?

#5 Post by nanashi »

Yep. But I have "ctc=anim.Blink".
If I put "\n" at the end, the arrow doesn't show at the end of the line.
Last edited by nanashi on Wed Sep 21, 2011 11:19 am, edited 1 time in total.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to start a new line before character speaks?

#6 Post by Aleema »

OH, have you tried vspace? You use it like this:

Code: Select all

a " Testing."
john "{vspace=30}Hello world!"
Try that out.

nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

Re: How to start a new line before character speaks?

#7 Post by nanashi »

Thanks. I tried, I got this error.
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/test.rpy", line 2529, in script
john "{vspace=30}hello world"
File "renpy-6.12.0-mainline/common/00nvl_mode.rpy", line 250, in python
Exception: Text tag vspace=30 was not recognized. Case and spacing matter here.
Can you tell me where I'm doing wrong?

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to start a new line before character speaks?

#8 Post by Aleema »

Actually, I think that code only works for 6.13 version of Ren'Py ... Sorry. ^^;
Maybe a blank line with {nw} tag in it?

Code: Select all

a " Testing."
"{nw}"
john "Hello world!"
I haven't tested that. Maybe it works.

nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

Re: How to start a new line before character speaks?

#9 Post by nanashi »

I think {nw} doesn't work.
It starts with the same line.

I'm downloaing 6.13 right now and see if vspace will work.

nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

Re: How to start a new line before character speaks?

#10 Post by nanashi »

Okay, I got 6.13 and tried vspace.
It doesn't work. It looks like this.
Last edited by nanashi on Wed Sep 21, 2011 11:19 am, edited 1 time in total.

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: How to start a new line before character speaks?

#11 Post by Aleema »

Wow, that sucks. It really seems like you can't get the effect you want ... :(
This is the last thing I would suggest, but maybe you can create a new character. And in that character, you adjust the top padding/margin.

Code: Select all

$ big_space = NVLCharacter(None, kind=nvl, window_top_padding = 30)
-___- Hope it works for you.

nanashi
Regular
Posts: 78
Joined: Tue Aug 09, 2011 12:54 am
Contact:

Re: How to start a new line before character speaks?

#12 Post by nanashi »

That works!
Thanks you so much :)

Post Reply

Who is online

Users browsing this forum: No registered users