Sizing a side image? Help!

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
drag0n38
Newbie
Posts: 2
Joined: Tue Jan 18, 2011 11:21 pm
Contact:

Sizing a side image? Help!

#1 Post by drag0n38 » Tue Jan 18, 2011 11:37 pm

Alright so I'm a newbie to Ren'py and I'm working with a few others building a game. I've run into a problem and I can't seem to find the answer. I am trying to have the MC appear on the left of the screen while she is talking. Which I have been able to do. The problem being is she is too big. I'm not sure what is the easiest way to reduce her size and properly code it. My current code I'll post below. Can someone suggest the best way to reduce the size of the image and how to code it?

Code: Select all

$ NMS = Character('Nanami', color="#5CB3FF", window_left_padding=160, show_side_image=Image ("Nanamismile.gif", xalign=0.0, yalign=1.0))

User avatar
denzil
Veteran
Posts: 293
Joined: Wed Apr 20, 2005 4:01 pm
Contact:

Re: Sizing a side image? Help!

#2 Post by denzil » Wed Jan 19, 2011 5:25 am

Use im.FactorScale instead of Image to load the side image. Here width is how much smaller you want the image (0.5 is half, 0.25 would be quarter the size and so on).

Code: Select all

$ NMS = Character('Nanami', color="#5CB3FF", window_left_padding=160, show_side_image=im.FactorScale ("Nanamismile.gif", width=0.5, xalign=0.0, yalign=1.0))
Practice makes purrrfect.
Finished projects: Broken sky .:. colorless day .:. and few more...

drag0n38
Newbie
Posts: 2
Joined: Tue Jan 18, 2011 11:21 pm
Contact:

Re: Sizing a side image? Help!

#3 Post by drag0n38 » Wed Jan 19, 2011 10:18 pm

Thanks denzil, it worked perfectly. Now I can continue and I learned something new!

Post Reply

Who is online

Users browsing this forum: badanni, Google [Bot]