On Hide ATL with Call Screen possible?

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
moogsparfait
Regular
Posts: 53
Joined: Mon Apr 28, 2014 9:26 pm
Completed: Danmaku!! (Card Game)
Projects: The Parasol Festival
Organization: Mystery Parfait
Contact:

On Hide ATL with Call Screen possible?

#1 Post by moogsparfait »

Is it possible to make call screen respect the on hide of a transform?

I have a transform with an on hide statement that my UI elements use. However it doesn't fire the on hide event when I use call screen to bring up the screen, only on a show screen and a subsequent hide screen.

Code: Select all

transform ui_slide_left(delay=0.0):
    xoffset -500
    pause delay
    ease .2 xoffset 0

    on hide:
        linear 0.2 xoffset -700
I have a video of it happening with the on hide not firing:
https://www.youtube.com/watch?v=5U7eqQc ... e=youtu.be

Edit: I'm apparently illiterate because this is mentioned in the docs. Is there no way to do this then?

Code: Select all

hide
Triggered when the transform is hidden using the hide statement or its Python equivalent.

Note that this isn't triggered when the transform is eliminated via the scene statement or exiting the context it exists in, such as when exiting the game menu.


User avatar
Kia
Eileen-Class Veteran
Posts: 1040
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: On Hide ATL with Call Screen possible?

#2 Post by Kia »

you can hide the element first and hide the screen with a delay using timer

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: On Hide ATL with Call Screen possible?

#3 Post by Imperf3kt »

Or just add more time to the delay already present in the transform? Currently your transform takes 0 seconds and the hide transform takes 0.2 seconds
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: On Hide ATL with Call Screen possible?

#4 Post by rames44 »

When the action is taken that would return from the screen, you could use an array of actions, hiding the screen first, then returning. I use this as a way of having “called” screens disappear with a transition, since you can pass a transition to the Hide.

Post Reply

Who is online

Users browsing this forum: Google [Bot], IrisColt