Page 1 of 1

[Solved] Easein / easeout on the overlay layer

Posted: Fri Jul 27, 2018 9:22 pm
by goldo
Hi guys,

So, I'm trying to have easein / easeout transitions that apply to the overlay layer. This is because I am displaying an image on top of a renpy screen (the master layer appears behind the screen so I can't use it). I want the image to enter from the left, then swipe out to the right.

I already know I should use define.move_transitions() to create a different 'ease' move family for the overlay layer that I called 'easeol'.

The strange thing is, this works just fine for the entering transition (easeolinleft), but the leaving transition just won't work. The image hides without any transition at all.

Here is the code snippet. I know very little about transitions, so I'm probably doing something wrong, but I can't figure it out:

Code: Select all

label challenge(result, _sound=None):
    
    $ define.move_transitions("easeol", 0.5, _ease_time_warp, _ease_in_time_warp, _ease_out_time_warp, layers=["overlay"])
    
    if result:
        if _sound:
            play sound s_success
        
        show success onlayer overlay with easeolinleft
        pause 1.0
        hide success with easeoloutright
        
    else:
        if _sound:
            play sound s_crash
            
        show failure onlayer overlay with easeolinleft
        pause 1.0
        hide failure with easeoloutright
        
    return
        

Re: Easein / easeout on the overlay layer

Posted: Sat Jul 28, 2018 3:46 am
by MaydohMaydoh
I played around with it for a bit and it seems to work if you make a new layer to display the image on.

Code: Select all

define config.layers = [ 'master', 'transient', 'screens', 'overlay', 'customlayer' ]
You also need to tell it what layer to hide on as well it seems.

Code: Select all

show success onlayer customlayer with easeolinleft
pause 1.0
hide success onlayer customlayer with easeoloutright
I don't know much about layers so I can't tell you why it doesn't work with overlay, but I do know it's used to display overlay functions. So maybe something to do with that.

Re: Easein / easeout on the overlay layer

Posted: Sun Jul 29, 2018 5:15 am
by goldo
It works now! Thank you so much!!! :D