Character Image on the side, over the tex tbox?

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
Allegra Hughes
Veteran
Posts: 371
Joined: Wed Oct 09, 2013 10:40 am
Completed: One Leaf Clover
Projects: Bitter Truth, Two Faced
Organization: Chisa Studios
Contact:

Character Image on the side, over the tex tbox?

#1 Post by Allegra Hughes »

Hello,
I'm have a premade set code for the GUI, but somehow I can't get the character to appear on top of the text box on the side. Instead the image appears behind it.

How do I change that?

Sidji972
Regular
Posts: 107
Joined: Tue Jan 21, 2014 8:50 pm
Location: Canada
Contact:

Re: Character Image on the side, over the tex tbox?

#2 Post by Sidji972 »

You can define a custom variable to set your new position:

Code: Select all

define myPosition = Position(xpos=XXX, ypos=XXX)
and apply this variable when you show your character picture.

Code: Select all

show girl at myPosition

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Character Image on the side, over the tex tbox?

#3 Post by Donmai »

Images that appear in front of dialogue must be declared as side images, and you will also need to adjust text padding so the text won't appear in front of the image. The easiest way is to declare your character with a side image:

Code: Select all

define y = Character('Your_character', window_left_padding=160, show_side_image=Image("your_character_image.png", xalign=0, yalign=1.0))
This will put your side image on the bottom-left corner. If you prefer it on the right, change xalign to 1.0 and use right padding instead of left padding.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
Allegra Hughes
Veteran
Posts: 371
Joined: Wed Oct 09, 2013 10:40 am
Completed: One Leaf Clover
Projects: Bitter Truth, Two Faced
Organization: Chisa Studios
Contact:

Re: Character Image on the side, over the tex tbox?

#4 Post by Allegra Hughes »

Donmai wrote:Images that appear in front of dialogue must be declared as side images, and you will also need to adjust text padding so the text won't appear in front of the image. The easiest way is to declare your character with a side image:

Code: Select all

define y = Character('Your_character', window_left_padding=160, show_side_image=Image("your_character_image.png", xalign=0, yalign=1.0))
This will put your side image on the bottom-left corner. If you prefer it on the right, change xalign to 1.0 and use right padding instead of left padding.
But is it possible to define that position so that I don't have to keep defining the different character expressions with the same location code?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Character Image on the side, over the tex tbox?

#5 Post by Donmai »

For a side image with several facial expressions you can use condition switch:
http://lemmasoft.renai.us/forums/viewto ... 91#p294991
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]