Hey everyone!
Hopefully an easy one: I want to change the place where the say screen appears (gui.textbox_yalign, and the gui.dialogue.xpos/ypos), depending on the speaker. For the protagonist, always up top (0). For anyone else, at the bottom (1.0).
But I cannot for the life of me figure out how to make Ren'py grab a variable (preferably just the single letter character-speaking/"who" variable?) and where to put that kind of check? I tried a couple of if conditions in the gui but couldn't make anything work. Is it because they're using a hard "define" instead of a "$"? Am I going about this the wrong way and should just make two separate new styles to try and append?
[SOLVED] Conditional "say" screen position changes
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.
- Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
- Contact:
[SOLVED] Conditional "say" screen position changes
Last edited by Chiligoat on Sat Sep 21, 2019 7:08 pm, edited 1 time in total.
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Conditional "say" screen position changes
I haven't tried this, but this might work:Chiligoat wrote: ↑Wed Sep 18, 2019 8:16 pm Hey everyone!
Hopefully an easy one: I want to change the place where the say screen appears (gui.textbox_yalign, and the gui.dialogue.xpos/ypos), depending on the speaker. For the protagonist, always up top (0). For anyone else, at the bottom (1.0).
But I cannot for the life of me figure out how to make Ren'py grab a variable (preferably just the single letter character-speaking/"who" variable?) and where to put that kind of check? I tried a couple of if conditions in the gui but couldn't make anything work. Is it because they're using a hard "define" instead of a "$"? Am I going about this the wrong way and should just make two separate new styles to try and append?
Code: Select all
define pro = Character("Protagonist", what_ypos=0.0)
Re: Conditional "say" screen position changes
Yeah, I'd prob use styles passed to a character rather than a check in the screen (although the latter is possible).
https://renpy.org/doc/html/dialogue.html#Character
Scroll down to Styling Text and Windows.
https://renpy.org/doc/html/dialogue.html#Character
Scroll down to Styling Text and Windows.
- Chiligoat
- Regular
- Posts: 31
- Joined: Thu Mar 21, 2019 7:42 pm
- Projects: Witches 4 Hire
- Location: Sweden
- Contact:
Re: Conditional "say" screen position changes
@philat, @hell_oh_world: Thanks to both of you! A little bit of reading and fiddling later, I got everything to work out exactly the way I want it, and have some basic style understanding now. For others in the same position: I used "window_yalign" and "what_xpos" to adjust what I needed. Cheers!
Who is online
Users browsing this forum: Ocelot