Applying a Show transition

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
qirien
Miko-Class Veteran
Posts: 542
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Applying a Show transition

#1 Post by qirien »

I have some buttons for sorting that get shown when the users clicks on a different button. I wanted them to slide in with a fade when they get shown, but I can't get the ATL to do that. It will do on hover and on idle, but no matter what I put in on show it never seems to do it.

Here's the ATL code:

Code: Select all

    transform slidefadeleft:
        on show:
            xoffset -10.0  alpha 0.0
            easein 2.5 xoffset 0.0 alpha 1.0
Then I have a screen like this:

Code: Select all

screen sort_buttons()
    imagebutton:
        idle imagefile
        at slidefadeleft
        action SetVariable("sortby", "calories")
And this screen is called from another screen like this:

Code: Select all

screen crops:
    textbutton "Sort By" xalign 0.0 action ToggleScreenVariable("show_sort")
        if (show_sort):
            use sort_buttons
Am I doing something wrong? Is there a better way to do this?
Finished games:
Image
Image
Image

User avatar
Alex
Lemma-Class Veteran
Posts: 3098
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Applying a Show transition

#2 Post by Alex »


User avatar
qirien
Miko-Class Veteran
Posts: 542
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: Applying a Show transition

#3 Post by qirien »

Thank you; that's exactly what I needed! I always used "if" so I didn't know that you should use "showif"... :-)
Finished games:
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: AvalonMelody, kedta35