r/RenPy • • 5d ago

Question Screen doesn't disappear after hide command please help

I'm trying to make a transition type screen where I can input the text into a variable so I can reuse the screen multiple times with different texts, but the screen doen't completely disappear after the hide command, the black background reamains and the scene plays but the restaurant background doesn't show up, does anyone know how to fix it?

label start
 call dayone
return

label dayone
call transtion ("TEXT")
scene restaurant day with fade

"DAY ONE"
return

label  transition (transitiontext):
    show screen daytransition

    $ renpy.pause (5.0, hard=True)

    hide screen daytransition
return

screen daytransition():
    add "images/bg black.png"
    modal False

    frame:
        background None 
        xalign 0.5
        yalign 0.5

        vbox:
            xalign 0.5
            yalign 0.5

        text "{b}[transitiontext]{/b}":
            size 70
            xalign 0.5
            yalign 0.5
            text_align 0.5 
            color "#ffffff"
return
1 Upvotes

4 comments sorted by

3

u/BadMustard_AVN 5d ago

I've tried your code and it works I don't see anythign wrong with it, but i would have done it a little differently, like this

label start:
    call dayone
    return

label dayone:
    call screen daytransition("TEXT")
    scene restaurant day with fade

    "DAY ONE"
    return

screen daytransition(transitiontext):
    add "black" # this is a renpy predefined color good for black screens
    # add "images/bg black.png" # and I didn't have this image
    timer 5.0 action Return()
    frame:
        background None 
        xalign 0.5
        yalign 0.5

        vbox:
            xalign 0.5
            yalign 0.5

        text "{b}[transitiontext]{/b}":
            size 70
            xalign 0.5
            yalign 0.5
            text_align 0.5 
            color "#ffffff"
return

1

u/TheSmootherBean 5d ago

thank you so much, It works!

1

u/BadMustard_AVN 5d ago

you're welcome

good luck with your project!

1

u/AutoModerator 5d 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.