Differentiating Left/Right Dialogue Windows Using Styles?

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
GlitchyReal
Newbie
Posts: 17
Joined: Mon Apr 09, 2018 12:28 am
IRC Nick: GlitchyReal
Deviantart: GlitchyReal
Contact:

Differentiating Left/Right Dialogue Windows Using Styles?

#1 Post by GlitchyReal »

I'm trying to emulate a Hotel Dusk-style text window where a dialogue box appears on the left for one character and, when finished speaking, a new box appears on the right for the other character.

I've been utilizing (multiple=2) but this (as far as I can tell) disallows the use of CPS scroll and other kinds of limitations.

I think it's possible to set a new style for the say_window and apply it on a per-character basis and then just define new characters depending on what side of the screen they need to be. (eg: Eileen_HappyL, Eileen_HappyR, etc.)

I'm trying to use something basic like this:

Code: Select all

style rightwindow is say_window:
    xpos 1425
    ypos 990

style leftwindow is say_window:
    xpos 970
    ypos 990
  
Assuming this is even the correct approach, I don't have any idea how to apply it to a character or how to call it or anything. As it is, it's a say_window with the changes I need an nowhere to go.

Can anyone help?
I'm a writer first, artist second, and a programmer... somewhere else. (I'm learning!)

Check out my work here!
http://www.DeviantArt.com/GlitchyReal

Support my work here!
http://www.Patreon.com/GlitchyReal

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Differentiating Left/Right Dialogue Windows Using Styles?

#2 Post by Ocelot »

https://www.renpy.org/doc/html/dialogue ... er-objects
Styling Text and Windows. Keyword arguments beginning with who_, what_, and window_ have their prefix stripped, and are used to style the character name, the spoken text, and the window containing both, respectively.

[...]

The style applied to the character name, spoken text, and window can also be set this way, using the who_style, what_style, and window_style arguments, respectively.
Example:

define eR = Character("Eileen", window_style="Eileen_right")
< < insert Rick Cook quote here > >

User avatar
GlitchyReal
Newbie
Posts: 17
Joined: Mon Apr 09, 2018 12:28 am
IRC Nick: GlitchyReal
Deviantart: GlitchyReal
Contact:

Re: Differentiating Left/Right Dialogue Windows Using Styles?

#3 Post by GlitchyReal »

Thank you again, Ocelot. I’ll give it a shot!

EDIT: This worked 100%, thought I'd mention.
I'm a writer first, artist second, and a programmer... somewhere else. (I'm learning!)

Check out my work here!
http://www.DeviantArt.com/GlitchyReal

Support my work here!
http://www.Patreon.com/GlitchyReal

Post Reply

Who is online

Users browsing this forum: Google [Bot], Kocker