Page 1 of 1

Disappearing screen problem

Posted: Sat Sep 22, 2018 8:35 am
by andyrenp
Hi all. I have added a time system in renpy and would like to show it at all times at the top left of the screen. I have made two simple room to room navigation screens to click on the doors to enter each room. The problem is as soon as the first navigation screen appears the 'dayperiod' screen (showing the day/time) disappears and stays "disappeared".

Does anybody know where I am going wrong? I'm still very new to renpy and have no previous game development experience. The user docs are still looking a foreign language to me.

Here is my code...

Code: Select all

screen dayperiod:
    hbox:
        textbutton "{b}Day: [clock.day]{/b} [clock.weekday] [clock.time]"
        textbutton "{b}Rest{/b}" action Call("rest")

label rest:
    $ clock.advance()
    jump hall

screen hallnav:
    add "hall.png"
    imagebutton auto "toroom_%s.png" focus_mask True action Jump ("room")

screen roomnav:
    add "room.png"
    imagebutton auto "tohall_%s.png" focus_mask True action Jump ("hall")

label start:

    show screen dayperiod
    "bla bla bla"

label hall:
    hide screen roomnav
    call screen hallnav

label room:
    hide screen hallnav
    call screen roomnav

Re: Disappearing screen problem

Posted: Sat Sep 22, 2018 8:56 am
by Remix

Code: Select all

init python:

    config.overlay_screens.append( "dayperiod" )
Should do you

Re: Disappearing screen problem

Posted: Sat Sep 22, 2018 9:06 am
by andyrenp
Thanks for the reply. I've just tried it out and unfortunately it doesn't fix the problem. I wonder if it's because my navigation room's idle and hover images are both full screen. The navigation works but maybe the day/time is hidden behind them?

Re: Disappearing screen problem

Posted: Sat Sep 22, 2018 9:58 am
by Remix
Those would be on the "screens" layer, which is behind "overlay", hence the suggestion.

I'd guess any issue remaining is due to the Call actions resolving as Return() and ending the screen interaction.
It would likely be best (especially while testing) to remove any buttons in the dayperiod screen and have it just display the text

Re: Disappearing screen problem

Posted: Sat Sep 22, 2018 10:12 am
by andyrenp
I have updated the code (below) removing the buttons from dayperiod but everything is still acting the same way. As soon as the game reaches the hall label it disappears.

Code: Select all

init python:
    config.overlay_screens.append( "dayperiod" )

screen dayperiod:
    hbox:
        text "{b}Day: [clock.day]{/b} [clock.weekday] [clock.time]"

screen hallnav:
    add "hall.png"
    imagebutton auto "toroom_%s.png" focus_mask True action Jump ("room")

screen roomnav:
    add "room.png"
    imagebutton auto "tohall_%s.png" focus_mask True action Jump ("hall")

label start:

    show screen dayperiod
    "bla bla bla"

label hall:
    hide screen roomnav
    call screen hallnav

label room:
    hide screen hallnav
    call screen roomnav

Re: Disappearing screen problem

Posted: Sat Sep 22, 2018 11:52 am
by andyrenp
I have stripped the code right down and the same problem persists. That is including the init python code as well as and without.

Code: Select all

init python:
    config.overlay_screens.append( "dayperiod" )

screen dayperiod:
    text "this is the time"

screen hallnav:
    add "hall.png"

label start:
    show screen dayperiod
    "bla bla bla"

label hall:
    call screen hallnav