Ren'Py MoveTransition left

iOtero

Active Member
Aug 4, 2020
925
1,459
Hi,

With this code my image appears sliding from the bottom to the top, I'm talking about an image 3 times higher than the screen.

Code:
show myimage
show myimage at top with MoveTransition(10.0)
But I can't get an image 3 times wider than the screen to appear from right to leftt.

With this code I get it to appear from the center of the image to the left, but not from the right of the image to the left.

Code:
show myimage
show myimage at left with MoveTransition(10.0)
What am I doing wrong?

Thanks for your help.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,548
This works, I think I went to the right though

Python:
image side_test:
    "6_168.jpg"
    xalign 0
    ease 2.5 xalign 0.9999
 
label pan_side:
    show side_test
    pause
Swapping the 0 and 0.999 should make it go the other way.

(I only did with an image twice as wide)

That 0.999 should be 1.0 for some reason I using 10 and was wondering why it wouldn't work.
 
Last edited:
  • Like
Reactions: Lou111 and iOtero

iOtero

Active Member
Aug 4, 2020
925
1,459
This works, I think I went to the right though

Python:
image side_test:
    "6_168.jpg"
    xalign 0
    ease 2.5 xalign 0.9999

label pan_side:
    show side_test
    pause
Swapping the 0 and 0.999 should make it go the other way.

(I only did with an image twice as wide)

That 0.999 should be 1.0 for some reason I using 10 and was wondering why it wouldn't work.
Thanks, it works very well as you said, and with this code it also works correctly:

Code:
    window hide
    scene 01_ct_02g:
        subpixel True
        xalign 1.0
        pause 1.0
        linear 9.0 xalign 0.0
I just wanted to know how to do it with MoveTransition() :D
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
My answer would have been a variation on Mickey's answer. In fact, almost identical to what you've settled upon.

Python:
label pan_side:

    scene my_wide_image:
        xalign 1.0 yalign 0.5
        easein 5.0 xalign 0.0
    pause 4.5

easein, easeout or linear would be fine. I've used 5 seconds rather than your 9 seconds, only because... well... no real reason.

I've also got a pause 4.5 after the scene to keep things full screen for a short while before continuing, since ATL animation timers are separate from the game advance timer. I tend to prefer there to be a small overlap between the animation and the game continuing, hence the 4.5 seconds rather than 5... but that's in part only to show that they don't have to be the same. An alternative to the pause statement would be to move the pause the scene statement with something like scene my_wide_image with Pause(4.5): instead.

I've never really noticed the difference between subpixel being on or off, but hey... that's my problem.
 
  • Like
Reactions: Lou111 and iOtero

iOtero

Active Member
Aug 4, 2020
925
1,459
My answer would have been a variation on Mickey's answer. In fact, almost identical to what you've settled upon.

Python:
label pan_side:

    scene my_wide_image:
        xalign 1.0 yalign 0.5
        easein 5.0 xalign 0.0
    pause 4.5

easein, easeout or linear would be fine. I've used 5 seconds rather than your 9 seconds, only because... well... no real reason.

I've also got a pause 4.5 after the scene to keep things full screen for a short while before continuing, since ATL animation timers are separate from the game advance timer. I tend to prefer there to be a small overlap between the animation and the game continuing, hence the 4.5 seconds rather than 5... but that's in part only to show that they don't have to be the same. An alternative to the pause statement would be to move the pause the scene statement with something like scene my_wide_image with Pause(4.5): instead.

I've never really noticed the difference between subpixel being on or off, but hey... that's my problem.
Thanks, as always very illustrative your examples.

And as for the subpixel, I put it as true because Renpy recommends it in this type of animations, not because I notice any difference... :ROFLMAO: