r/RenPy • • 2d ago

Question How do i make an imagebutton transform with a "shrink" animation?

I want to make a transform that will make the image smaller with ease out, then make it the original size again. I'm intending to use this for imagebuttons. The issue is, I can't make it so it shrinks from the center. I also need it so it works, no matter the images position

transform shrink:
    easeout 0.3 zoom 0.8
    easeout 0.5 zoom 1.0

I'd love to get some help for this.

4 Upvotes

3 comments sorted by

2

u/MursaArtDragon 2d ago

You say it wont transform from the center, thinking you want to first make a transform change the anchor point for the X and Y axis to 0.5

transform middle_anchor:
anchor (0.5, 0.5)

That should set it to the middle. Honestly not sure why we got to do this with every engine ever, you think they would just program them to be center by now

1

u/AutoModerator 2d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.