screen animation on return

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
Anne
Veteran
Posts: 321
Joined: Mon Apr 01, 2013 8:19 pm
Completed: Fae
Contact:

screen animation on return

#1 Post by Anne »

I'd like the menu screens to slide up when returning to the game. How do I do that?
On show they slide down just fine with a transform, but what should I use for the opposite? (if I change return to hide it just closes the screen, without returning to the game)
Then there're config.transitions but slide moves the screen with the current game background (the screens are partially transparent), maybe I should use something else?

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: screen animation on return

#2 Post by namastaii »

Try something like this but with your transform code:

Code: Select all

transform basicfade:
        on show:
            alpha 0.0
            linear 1.0 alpha 1.0
        on hide:
            linear 1.0 alpha 0.0     
You probably just need to add the 'on hide' line

edit** nevermind, I just realized you said you want it to slide up on hide. So make a new transform. I'm assuming you're using 'slidedown'? There is also a 'slideup'

User avatar
Anne
Veteran
Posts: 321
Joined: Mon Apr 01, 2013 8:19 pm
Completed: Fae
Contact:

Re: screen animation on return

#3 Post by Anne »

"on hide" doesn't work if I use Return() and not hide and if I use hide the screen just closes without going back to the game

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: screen animation on return

#4 Post by namastaii »

I tend to make my return look something like this:

Code: Select all

textbutton "Exit" action [Hide("screen_name_here"), Return()]


User avatar
Anne
Veteran
Posts: 321
Joined: Mon Apr 01, 2013 8:19 pm
Completed: Fae
Contact:

Re: screen animation on return

#5 Post by Anne »

I wonder why this didn't work when I first tried it... Thank you.

Post Reply

Who is online

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