xalign, xpos, etc (position style properties) Not working

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
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

xalign, xpos, etc (position style properties) Not working

#1 Post by meiri »

I've been having this issue with when I use xalign,ypos, xpos, yalign, yanchor, etc.

Heres an example:

Here, I defined a side image, as well as scaled it using im.FactorScale

Code: Select all

image side liltabi neutral=Image(im.FactorScale("sprites/liltabi/liltabi_neutral.png", 0.7,0.7))
Then, lower down, I tried to position it, because it was covering the name...

Code: Select all

define lt = Character('Tabitha',color="#006DBF",window_left_padding=195, image="liltabi",xalign=1.0)
But the image doesn't move.

I also tried this:

Code: Select all

image side liltabi neutral=Image(im.FactorScale("sprites/liltabi/liltabi_neutral.png", 0.7,0.7),xalign=1.0)
define lt = Character('Tabitha',color="#006DBF",window_left_padding=195, image="liltabi")
but the image still doesn't move. I tried giving different positions (eg. xalign=2.0) or using xpos (xpos=2.0)

I've reloaded as well as restarted Ren'py but theres no change in the image.

I also had this issue earlier when trying to position a custom name and namebox, but neither would budge and I had to omit the namebox from the rest of my textbox.
Wondering if anyone can point out my issue or explain what Im doing incorrectly.

Also:
Im aware that I could reposition side images entirely by customizing the say screen, and that MIGHT work, but I need this side image to be positioned in a specific way, and I have another side image thats already positioned correctly, and I don't want to mess THAT image up by customizing the say screen.
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: xalign, xpos, etc (position style properties) Not workin

#2 Post by SundownKid »

Have you thought about adding some transparent space to the image to make it appear in a different position while sharing the alignment of your previous side image?

As for the namebox, you can change the alignment by modifying the style "say_who_window".

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: xalign, xpos, etc (position style properties) Not workin

#3 Post by PyTom »

You have to customize the say screen, at least to remove the "xalign 0.0" clause. It's overriding the xalign you're giving the side image.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Re: xalign, xpos, etc (position style properties) Not workin

#4 Post by meiri »

SundownKid wrote:Have you thought about adding some transparent space to the image to make it appear in a different position while sharing the alignment of your previous side image?
Ah, I didn't think about this, it's definitely something I'll have to keep in mind for later.
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

User avatar
meiri
Regular
Posts: 177
Joined: Wed Jun 25, 2014 6:21 pm
Projects: Tutor Tabitha, Movement
Organization: Blue Bottlecap Games
Location: East Coast, US
Contact:

Re: xalign, xpos, etc (position style properties) Not workin

#5 Post by meiri »

PyTom wrote:You have to customize the say screen, at least to remove the "xalign 0.0" clause. It's overriding the xalign you're giving the side image.
Oooh, okay, that makes much more sense. It seems to have fixed it as well. Thank you!
What's in a loop? A loop iterated in any other way would output as sweet.
--
Have a look at my GxG kinetic novel, Movement, if you have the chance?

Post Reply

Who is online

Users browsing this forum: Ocelot