[Solved] Two character objects in dialogue box

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
Doeny
Regular
Posts: 145
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

[Solved] Two character objects in dialogue box

#1 Post by Doeny »

Hi, is there a way to put two characters under a define character line so they both appear in one dialogue box?
Last edited by Doeny on Sat Nov 18, 2023 9:30 pm, edited 1 time in total.

User avatar
m_from_space
Miko-Class Veteran
Posts: 949
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Two character objects in dialogue box

#2 Post by m_from_space »

Doeny wrote: Sun Nov 12, 2023 8:51 am Hi, is there a way to put two characters under a define character line so they both appear in one dialogue box?
No, you cannot define two distinct characters within one object.

But you can still show lines of dialogue from different characters at the same time using Renpy's "multiple dialogue" feature: https://www.renpy.org/doc/html/multiple.html

On the other hand, you can of course create one character object that would resemble two characters (let's say Siamese twins):

Code: Select all

define twins = Character("Sally & Lucy")

label start:
    twins "Sally: Hey there! Lucy: Oh come on Sally, don't be that polite!"
But it's probably easier to create unique objects for both of them, then use the same "side image" when they are speaking and/or use the multiple dialogue feature mentioned above. This way you can set distinct colors and whatnot and also don't have to put in their names all the time.

Doeny
Regular
Posts: 145
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

Re: Two character objects in dialogue box

#3 Post by Doeny »

m_from_space wrote: Tue Nov 14, 2023 8:43 am
Doeny wrote: Sun Nov 12, 2023 8:51 am Hi, is there a way to put two characters under a define character line so they both appear in one dialogue box?
No, you cannot define two distinct characters within one object.

But it's probably easier to create unique objects for both of them, then use the same "side image" when they are speaking and/or use the multiple dialogue feature mentioned above. This way you can set distinct colors and whatnot and also don't have to put in their names all the time.
For some reason when using the multiple dialogue, both second character's text and textbox cover the first one. But it can be fixed by changing the styles.

User avatar
m_from_space
Miko-Class Veteran
Posts: 949
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Two character objects in dialogue box

#4 Post by m_from_space »

Doeny wrote: Sat Nov 18, 2023 9:33 pmFor some reason when using the multiple dialogue, both second character's text and textbox cover the first one. But it can be fixed by changing the styles.
It's necessary to define different styles to make multiple character dialogue work. It's not a strange reason. ;) (Read more about it in the link I provided.)

Post Reply

Who is online

Users browsing this forum: sinezub