Page 1 of 1
Adding a side image with different expressions (ANSWERED)
Posted: Mon Sep 02, 2013 8:16 am
by Nayara NightRoo
Well, hi!
The fact is I have been trying to add a side image to a character, but I have several problems:
-I need it at right.
-I need it to have different expressions.
-And I have no idea of the size it should have.
If someone could help me, I would be grateful.

Re: Adding a side image with different expressions
Posted: Mon Sep 02, 2013 10:49 am
by Talann
I made a video quite a while ago explaining how to create side images.
You can check it out here
...And urh, sorry for my crappy voice ;-;
EDIT: I also forgot that I haven't added differen't expressions and such to the video so here is an example code for different expressions that I created for my project Shooting Stars:
Code: Select all
define t = Character('Tay', color="#c8ffc8", image="tay", window_left_padding=160,)
image side tay normal= "side_normal.png"
image side tay sad= "side_sad.png"
image side tay happy= "side_happy.png"
image side tay vhappy= "side_vhappy.png"
image side tay blush= "side_blush.png"
image side tay angry= "side_angry.png"
image side tay shocked= "side_shocked.png"
init:
$ offScreen = Position(xpos=1, xanchor='left', ypos=0)
...And to put the side image at right, just change the xanchor and window_padding to right like this:
Code: Select all
define t = Character('Tay', color="#c8ffc8", image="tay", window_right_padding=160,)
and
Code: Select all
init:
$ offScreen = Position(xpos=1, xanchor='right', ypos=0)
And for the size, it depends on your textbox. So probably about 187 x 160 px
This is up to you though, but that's what size I chose for mine.
Good luck!
Re: Adding a side image with different expressions
Posted: Mon Sep 02, 2013 12:43 pm
by Nayara NightRoo
Well, first of all, thank you very much!
It seems your throat was giving you problems that day, but it's okay. 
I tried everything and the side image does appear (though I don't have the sized image yet), but I just have one problem: the image appears at left and, worst of all, hide the text. I attach a picture so you can see it.
And here's the code I made with your help:
Code: Select all
define m = Character('Madeleine', color="#FF99CC", image="madeleine", window_right_padding=160,)
image side madeleine= "side_m1.png"
image side madeleine sad= "side_m3.png"
image side madeleine happy= "side_m2.png"
image side madeleine blush= "side_m4.png"
image side madeleine angry= "side_m5.png"
image side madeleine shocked= "side_m6.png"
init:
$ offScreen = Position(xpos=1, xanchor='right', ypos=0)
Do you think you can help me?
Re: Adding a side image with different expressions
Posted: Mon Sep 02, 2013 12:51 pm
by Talann
Try this.
Code: Select all
define t = Character(u'Tay', window_right_padding=160, show_side_image=Image("tay.png", xalign=1.0, yalign=1.0))
If it doesn't work then try this:
Code: Select all
init:
$ offScreen = Position(xalign=1.0, yalign=1.0)
I hope I'm not wrong
Re: Adding a side image with different expressions
Posted: Tue Sep 03, 2013 5:05 am
by Nayara NightRoo
Yay, it worked!!! And with the first code!

(Though I had to write in the image part: side_image, as you said on the video).
Thank you very much for all your help.

Re: Adding a side image with different expressions (ANSWERED
Posted: Tue Oct 29, 2013 1:57 pm
by silverpikachu99
I'm not sure what's wrong with mine but, it doesn't seem to work for me

I'll show you.
Code: Select all
define t = Character(u'Tay', window_right_padding=160, show_side_image=Image("side_tay.png", xalign=1.0, yalign=1.0))
image side Tay = "side_tay.png"
init:
$ offScreen = Position(xalign=1.0, yalign=1.0)
# The game starts here.
label start:
t "You've created a new Ren'Py game."
t "Once you add a story, pictures, and music, you can release it to the world!"
return
I put this in and this happens :

- :((
What should I do?
Re: Adding a side image with different expressions (ANSWERED
Posted: Tue Oct 29, 2013 5:17 pm
by xavimat
Perhaps window_right_padding=160 is not enough.
Try with window_right_padding=300 and see if there is a change. Then adjust it.
IMO this image is a little too big for a side image (but it can work, of course)