Page 1 of 1

ATL Transform Not Working Sometimes with LiveComposite

Posted: Tue Nov 16, 2021 10:05 pm
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?

Re: ATL Transform Not Working Sometimes with LiveComposite

Posted: Tue Nov 16, 2021 10:19 pm
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.)

Re: ATL Transform Not Working Sometimes with LiveComposite

Posted: Tue Nov 16, 2021 10:56 pm
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.

Re: ATL Transform Not Working Sometimes with LiveComposite

Posted: Tue Nov 16, 2021 11:52 pm
by PyTom
That's probably right. You can also look at Fixed, with its various fit options. (xfit, yfit, and fit_first).