Can I define a character with kind=extend?

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
User avatar
IF Classics
Newbie
Posts: 13
Joined: Thu Nov 20, 2014 7:52 pm
Contact:

Can I define a character with kind=extend?

#1 Post by IF Classics » Thu Dec 25, 2014 3:37 pm

Let me present the problem differently...

Can I define a character as such:

Code: Select all

define extendright = Character(None, kind=extend, what_min_width=800, what_text_align = 1.0)
When I try, I get this error:

"TypeError: function() argument 1 must be code, not None"

What is it looking for in the "name" argument???

===========
History

[First time I asked the question]

If I have these statements:

Code: Select all

m "This is a sentence."
extend "This is another sentence."
How do I apply "text_align = 1.0" to the "extend" special character so "This is another sentence" gets right aligned?

I don't know how to write the code.

Thanks for your help.
Last edited by IF Classics on Thu Dec 25, 2014 11:22 pm, edited 2 times in total.

User avatar
mjshi
Regular
Posts: 179
Joined: Wed Mar 13, 2013 9:55 pm
Completed: MazeSite01, Ponderings of Time
Contact:

Re: How to apply text style to "extend" special character?

#2 Post by mjshi » Thu Dec 25, 2014 4:44 pm

Just for clarification, are you attempting to have something like

Code: Select all

|---------------------------------------------------------------------------------|
|This is a sentence.[player click]                       This is another sentence.|
|---------------------------------------------------------------------------------|
happen in the text box?

User avatar
IF Classics
Newbie
Posts: 13
Joined: Thu Nov 20, 2014 7:52 pm
Contact:

Re: How to apply text style to "extend" special character?

#3 Post by IF Classics » Thu Dec 25, 2014 5:39 pm

Thanks for your question. I oversimplified the problem.

Yes, your picture is good, BUT "This is another sentence" would be on the next line down (i.e. on its own line).

Basically, I don't know how to apply any style properties to the "extend" special character.

User avatar
mjshi
Regular
Posts: 179
Joined: Wed Mar 13, 2013 9:55 pm
Completed: MazeSite01, Ponderings of Time
Contact:

Re: How to apply text style to "extend" special character?

#4 Post by mjshi » Thu Dec 25, 2014 8:58 pm

Hmm, I'm not sure if it's possible to do something like that.

As a temporary solution (if this text style to extend thing doesn't occur very often) you could try using the {space= integer} and /n tags.

A bit of prior warning, though- you'll need to manually adjust the integer until it "looks right".

Example:

Code: Select all

label start:

    e "You've created a new Ren'Py game.\n"

    extend "{space=600}Right align!"

    return

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Can I define a character with kind=extend?

#5 Post by Alex » Fri Dec 26, 2014 4:00 pm

This looks more like you trying to show the words of two characters at the same time.
http://lemmasoft.renai.us/forums/viewto ... ow#p324575

Also, you could try nvl-mode (with some customization).
http://lemmasoft.renai.us/forums/viewto ... 51&t=17232
http://lemmasoft.renai.us/forums/viewto ... t=nvl+line
http://lemmasoft.renai.us/forums/viewto ... two+window

Post Reply

Who is online

Users browsing this forum: No registered users