ATL Transform Not Working Sometimes with LiveComposite

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
amaturemanga
Regular
Posts: 97
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

ATL Transform Not Working Sometimes with LiveComposite

#1 Post by amaturemanga »

Hi there, im running into a strange issue using ATL Transform with LiveComposite or rather how its called now Composite. Basically all my sprites i do using LiveComposite and it works just fine but sometimes when i try and do an ATL transform on the sprite it either works, doesn't do it at all or it completely displays the sprite on only the left side of the screen.

For example take this sprite, the screen size is 1280x720, the sprite images for Composite is 404x720 and the Composite code is as follows:

Code: Select all

image Yumi1 = LiveComposite(
    (1280, 720),
    (0, 0), "/images/Sprites/Yumi/Yumi1Body.png",
    (0, 0), "/images/Sprites/Yumi/Yumi1Head.png",
    (0, 0), "/images/Sprites/Yumi/Yumi1Eyebrows.png",
    (0, 0), "/images/Sprites/Yumi/Yumi1EyesOpen.png",
    (0, 0), "/images/Sprites/Yumi/Yumi1Mouth.png",
    (0, 0), "Yumi 1 blink"
    )
    
    image Yumi 1 blink:
    choice:
        3.5
    choice:
        4.5
    choice:
        5.5
    "/images/Sprites/Yumi/Yumi1EyesOpen.png"
    .05
    "/images/Sprites/Yumi/Yumi1EyesHalf.png"
    .08
    "/images/Sprites/Yumi/Yumi1EyesClosed.png"
    .018
    "/images/Sprites/Yumi/Yumi1EyesHalf.png"
    .01
    "/images/Sprites/Yumi/Yumi1EyesOpen.png"
    1
    repeat
and in the script i used her like this:

Code: Select all

show Yumi3:
        xalign 0.2
        movetocenter
        moveleft
    with dissolve
where movetocenter and moveleft are defined like this:

Code: Select all

transform moveleft:
    linear 0.5 xpos 0.2

transform movetocenter:
    linear 0.5 xpos 0.5
and this worked however when i did the same thing with another sprite resized the images so its not 1280x720 and defined the following transform:

Code: Select all

transform moveinnerright:
    linear 0.5 xpos 0.7
and then called her like this instead of appearing on the right side of the screen she appeared on the left side and no matter what i did the furthest to the right she would go is to the center:

Code: Select all

show Maya3:
       xalign 0.8
       moveinnerright
with dissolve
so idk what's going on did i define something wrong, is it glitching because of the Composite?

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: ATL Transform Not Working Sometimes with LiveComposite

#2 Post by PyTom »

In general, xalign doesn't work when the displayable is the size of the screen, which you have here. (It's working fine, but with a 1280x720 screen and sprite, it doesn't do anything useful.)
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
amaturemanga
Regular
Posts: 97
Joined: Sun Mar 08, 2015 6:55 pm
Deviantart: amaturemanga
Skype: amature.manga
Contact:

Re: ATL Transform Not Working Sometimes with LiveComposite

#3 Post by amaturemanga »

PyTom wrote: Tue Nov 16, 2021 10:19 pm In general, xalign doesn't work when the displayable is the size of the screen, which you have here. (It's working fine, but with a 1280x720 screen and sprite, it doesn't do anything useful.)
so then i would have to resize all the images and set the (1280, 720) to the new size of the images i imagine then.

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: ATL Transform Not Working Sometimes with LiveComposite

#4 Post by PyTom »

That's probably right. You can also look at Fixed, with its various fit options. (xfit, yfit, and fit_first).
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

Post Reply

Who is online

Users browsing this forum: Google [Bot]