Hi! My name's Cos, I'm brand new to the forum, though I've found a heck of a lot of guidance on here in other people's threads.
I'm working on my first ren'py project where you play as two characters, one during the day and one at night. The thing is, I'd like the dialogue choices to look different depending on the character you're playing, and I can't for the life of me work out how to do it.
This is a screenshot from the game, with how I want the choices to look - Calliope's choices are on the left, Len's are on the right. I just don't know how to actually action this when it comes to coding.
Thank you in advance, and I'm sorry if I've posted this in the wrong place or something, I am a newborn baby of a ren'pyer
Cos
Different choice menus per character
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
- JasonTerrific
- Newbie
- Posts: 3
- Joined: Thu Oct 08, 2020 10:41 am
- Projects: Eat The Rich
- Organization: Jason Terrific™
- Deviantart: elgorgadier
- itch: jasonterrific
- Contact:
Re: Different choice menus per character
Hi, JasonTerrific,
You should address questions regarding RenPy coding/bugs/etc. to Ren'Py Questions and Announcements forum.
Anyway, there are two approaches for that:
1) Use a variable that controls which style to use. For example:
2) Creating another choice screen and specify which screen to use:
In both cases, you need to modify and create styles to achieve the desired design. For example something like this:
For this example to work you need to put proper images(idle and hover) for both design in the gui/button/ folder.
You should address questions regarding RenPy coding/bugs/etc. to Ren'Py Questions and Announcements forum.
Anyway, there are two approaches for that:
1) Use a variable that controls which style to use. For example:
Code: Select all
default choice_2 = False
screen choice(items):
if choice_2:
style_prefix "choice_2"
else:
style_prefix "choice"
vbox:
for i in items:
textbutton i.caption action i.action
label start:
$ choice_2 = True
#The choice for character 2 is activated
menu:
...
Code: Select all
screen choice_2(items):
style_prefix "choice_2"
...
label start:
menu (screen="choice_2"):
...
Code: Select all
style choice_vbox is vbox
style choice_button is button
style choice_button_text is button_text
style choice_vbox:
xsize 400
xalign 0.1
yalign 1.0
spacing gui.choice_spacing
style choice_button is default:
properties gui.button_properties("choice_button")
idle_background "gui/button/choice_idle_background.png"
hover_background "gui/button/choice_hover_background.png"
xsize 400
style choice_button_text is default:
properties gui.button_text_properties("choice_button")
yalign 0.5
style choice_2_vbox is vbox
style choice_2_button is button
style choice_2_button_text is button_text
style choice_2_vbox:
xsize 400
xalign 0.9
yalign 1.0
spacing gui.choice_spacing
style choice_2_button is default:
properties gui.button_properties("choice_button")
idle_background "gui/button/choice_idle_background_2.png"
hover_background "gui/button/choice_hover_background_2.png"
xsize 400
style choice_2_button_text is default:
properties gui.button_text_properties("choice_button")
yalign 0.5
- JasonTerrific
- Newbie
- Posts: 3
- Joined: Thu Oct 08, 2020 10:41 am
- Projects: Eat The Rich
- Organization: Jason Terrific™
- Deviantart: elgorgadier
- itch: jasonterrific
- Contact:
Re: Different choice menus per character
Thanks so much for your response, I'm gonna have a look into it and see how it works. Also, sorry for not using the correct forum, I won't make that mistake in future
Who is online
Users browsing this forum: No registered users