[Solved] Setting position of side images

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
htk318
Newbie
Posts: 10
Joined: Sat Apr 20, 2013 4:36 pm
Location: Louisiana, USA
Contact:

[Solved] Setting position of side images

#1 Post by htk318 » Tue Jan 14, 2014 10:27 pm

Hi all, silly problem here. On my last project, I got side images to work with no problems. My text box was in the center bottom of the screen with some space on the sides, and my side image was inside of the textbox.
The problem is, I tried to replicate that effect in my current project and it isn't working. What I have looks like this:

Code: Select all

$ c = Character('Charactername', image="c", show_two_window=True, color="#ffe2e3", ctc="ctc_animation", ctc_position="nestled")
$ c2 = Character('Charactername', image="c2", show_two_window=True, color="#ffe2e3", window_left_padding=160, ctc="ctc_animation", ctc_position="nestled")
image c2 normal = Null ()
image side c2 normal = "side_c_yell.png"
This is what I have in the script.rpy of my first game. But when I press play, the text in the textboxt has left padding of 160, but the side image stays in the bottom left corner of the screen. How do I fix this?

I did update to the current version of Ren'Py before I started this project, is that the issue?
Thanks for the help.
Last edited by htk318 on Wed Jan 15, 2014 9:43 am, edited 1 time in total.

Crazy Li
Regular
Posts: 113
Joined: Fri Jan 03, 2014 3:35 pm
Contact:

Re: Setting position of side images

#2 Post by Crazy Li » Wed Jan 15, 2014 2:58 am

htk318 wrote:Hi all, silly problem here. On my last project, I got side images to work with no problems. My text box was in the center bottom of the screen with some space on the sides, and my side image was inside of the textbox.
The problem is, I tried to replicate that effect in my current project and it isn't working. What I have looks like this:

Code: Select all

$ c = Character('Charactername', image="c", show_two_window=True, color="#ffe2e3", ctc="ctc_animation", ctc_position="nestled")
$ c2 = Character('Charactername', image="c2", show_two_window=True, color="#ffe2e3", window_left_padding=160, ctc="ctc_animation", ctc_position="nestled")
image c2 normal = Null ()
image side c2 normal = "side_c_yell.png"
This is what I have in the script.rpy of my first game. But when I press play, the text in the textboxt has left padding of 160, but the side image stays in the bottom left corner of the screen. How do I fix this?

I did update to the current version of Ren'Py before I started this project, is that the issue?
Thanks for the help.
As far as I know, the position of side images is not done in the script, but in screens.rpy.

Go to the Say window and look for the following:

Code: Select all

    # If there's a side image, display it above the text.
    if side_image:
        add side_image
    else:
        add SideImage() xalign 0.0 yalign 1.0
Change that last line to a different xalign if you don't want it all the way at the left of the screen.

User avatar
htk318
Newbie
Posts: 10
Joined: Sat Apr 20, 2013 4:36 pm
Location: Louisiana, USA
Contact:

Re: Setting position of side images

#3 Post by htk318 » Wed Jan 15, 2014 9:43 am

As expected, it was something really simple that I forgot to look over. OTL
Thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot]