[SOLVED] trying to use easein transforms behind objects

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
bloobeary
Regular
Posts: 36
Joined: Fri Oct 04, 2019 3:02 pm
Deviantart: bloobeary
Soundcloud: user-212448702
Contact:

[SOLVED] trying to use easein transforms behind objects

#1 Post by bloobeary »

I'm trying to have a bus drive onscreen and pass behind a tree before slowing to a stop at a bus stop. I already have the graphics for the bus, tree and bus stop created, and am attempting to code this, but I just can't seem to make it work.

I'm currently using this:

Code: Select all

transform slowfromleft:
    xalign -0.5
    easein 5.0 xalign 0.5
a transform sitting in the code before the label start

And this bit of code where I want the bus to appear:

Code: Select all

    show bus at slowfromleft behind tree
The problem I'm running into is that it's just ignoring the transform, and instantly plopping the bus onscreen at center.

It's correctly behind the tree, but it's not driving in from the left the way I want.
Last edited by bloobeary on Thu Sep 16, 2021 2:47 pm, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: trying to use easein transforms behind objects

#2 Post by Remix »

I would avoid using align/xalign/yalign unless you really understand that they alter both the anchor and the position...

Perhaps try separating them...

Code: Select all

transform slowfromleft:
    xanchor 1.0 ## start with anchor at right edge of bus
    xpos 0.0 ## position that anchor at the left side of screen
    
    ## move anchor to middle and position to screen middle (over 5 seconds)
    easein 5.0 xpos 0.5 xanchor 0.5
If that doesn't fix it, alter the show line to put the transform at the end
show bus behind tree at slowfromleft
Frameworks & Scriptlets:

bloobeary
Regular
Posts: 36
Joined: Fri Oct 04, 2019 3:02 pm
Deviantart: bloobeary
Soundcloud: user-212448702
Contact:

Re: trying to use easein transforms behind objects

#3 Post by bloobeary »

I did everything you suggested, and it worked perfectly. Thank you so much :)

Been tearing my hair out over that one.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], LittleRainySeasons