How do I show a character on top of the dialouge box??
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.
- Arctic Tempest
- Newbie
- Posts: 9
- Joined: Thu Sep 27, 2012 7:43 pm
- Projects: Gemini:Shadow
- Contact:
How do I show a character on top of the dialouge box??
How can I show my character on top of the dialouge box at the left without covering or interupting the dialouge???
Kinda like this...
Please help!
Kinda like this...
Please help!
-
CheeryMoya
- Miko-Class Veteran
- Posts: 892
- Joined: Sun Jan 01, 2012 4:09 am
Re: How do I show a character on top of the dialouge box??
That's your basic sideimage. If you want one that can change expression and keep one defining block, here's the code I use:
Replacing p for the phrase you want to use for your speaker, Protagonist for the name, and protag[expression].png for whatever names your files are. In dialogue, you code it like so:
And the expression on the sideimage will change accordingly.
P.S. For future questions like these, please ask in the Ren'Py Questions and Announcements board. The Cookbook is for posting up code that can be used by others.
Code: Select all
define p = Character('Protagonist',
color="#4169E1",
window_left_padding=210,
show_side_image=ConditionSwitch(
"express == 'sad'", "protagsad.png",
"express == 'surprised'", "protagsurprised.png",
"express == 'happy'", "protaghappy.png",
"express == 'angry'", "protagangry.png",
"express == 'blush'", "protagblushing.png",
"express == 'normal'", "protagnormal.png", xalign=0.0, yalign=1.0,
)
)Code: Select all
$ express = "sad"
p "What a lousy day."
"A box of pizza falls from the sky onto your lap."
$ express = "happy"
p "Whoa! I'm so happy right now!"P.S. For future questions like these, please ask in the Ren'Py Questions and Announcements board. The Cookbook is for posting up code that can be used by others.
- Arctic Tempest
- Newbie
- Posts: 9
- Joined: Thu Sep 27, 2012 7:43 pm
- Projects: Gemini:Shadow
- Contact:
Re: How do I show a character on top of the dialouge box??
Thanks so much!
Sorry about posting it here...
Sorry about posting it here...
Re: How do I show a character on top of the dialouge box??
A somewhat simpler method I found was this:
and then just define your character multiple times, each one with a different expression. The window_left_padding and x/yalign can be adjusted based on how big your image is.
Code: Select all
define Cexpression = Character('Character name', window_left_padding=200,
show_side_image=Image("Character_expression_portrait.png", xalign=0.0, yalign=1.0))