Disappearing screen problem

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
andyrenp
Newbie
Posts: 6
Joined: Sat Sep 15, 2018 2:21 pm
Contact:

Disappearing screen problem

#1 Post 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

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Disappearing screen problem

#2 Post by Remix »

Code: Select all

init python:

    config.overlay_screens.append( "dayperiod" )
Should do you
Frameworks & Scriptlets:

andyrenp
Newbie
Posts: 6
Joined: Sat Sep 15, 2018 2:21 pm
Contact:

Re: Disappearing screen problem

#3 Post 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?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Disappearing screen problem

#4 Post 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
Frameworks & Scriptlets:

andyrenp
Newbie
Posts: 6
Joined: Sat Sep 15, 2018 2:21 pm
Contact:

Re: Disappearing screen problem

#5 Post 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

andyrenp
Newbie
Posts: 6
Joined: Sat Sep 15, 2018 2:21 pm
Contact:

Re: Disappearing screen problem

#6 Post 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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Majestic-12 [Bot]