Call/Show screen return and pause issues

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
dragonsmidst
Newbie
Posts: 5
Joined: Mon Nov 02, 2020 2:49 pm
itch: Rollback
Contact:

Call/Show screen return and pause issues

#1 Post by dragonsmidst » Sun Apr 18, 2021 2:41 pm

Hello, I recently updated from 7.3.5 to 7.4.4 and have encountered some issues I haven't been able to find a working solution for yet. The main issue is with calling screens and showing screens and them no longer being modal so the game will still continue behind them, especially if the skip function is used like holding CTRL. I had been using show screen alot for many of the screens that I had been pulling up in the script and I was able to find that using call instead of show will honor a hard pause which is what I wanted, however, when I did this on my splash screen (a content warning screen where the player needs to either accept or quit), it no longer continues to the Main Menu when the accept imagebutton is clicked.

Code: Select all

screen warning():
    add "BG/Menus/splash_warning.png"
    modal True

    hbox:
        xalign 0.5
        yalign 0.85
        spacing 20

        imagebutton auto "BG/Menus/warn_continue_%s.png" action [Hide("warning", transition=dissolve), Return()]
        imagebutton auto "BG/Menus/warn_quit_%s.png" action Quit(confirm=False)

screen seizure_warning():
    add "BG/Menus/splash_seizure_warning.png"
    modal True

label splashscreen:
    scene black with dissolve
    $ renpy.pause (2, hard=True)
    show logo with dissolve
    $ renpy.pause (1, hard=True)
    show mattmal at slideleft
    show gameby at slideright
    $ renpy.pause (3, hard=True)
    scene black with dissolve
    $ renpy.pause (2, hard=True)
    show artby at slideright
    show bull at slideleft
    $ renpy.pause (3, hard=True)
    scene black with dissolve
    show seizure_warning
    with dissolve
    $ renpy.pause(3, hard=True)
    scene black with dissolve
    call screen warning()
    with dissolve
    $ renpy.pause(hard=True)
Does anyone know if this happened to be a "bug" or if there is a new way that the code needs to be written with the pause changes from 7.4.1 that I haven't come across yet?

Also, there is another issue I am having later in the game where I've added an imagebutton to the quickmenu that pulls up a screen that shows various in-game info. The button works as intended, however it has the same issue of the game still skipping behind the screen since modal no longer does anything seemingly.

Code: Select all

screen palbutton():
    hbox xalign 0.85 yalign 0.70:
        spacing 10
        imagebutton auto "Pal/Icons/gem_%s.png" action [SetVariable("myLoc", "stats"), SelectedIf(myLoc== "stats"), Show("stats_screen")]:
            focus_mask True
        imagebutton auto "Pal/Icons/load_%s.png" action ShowMenu("load"):
            focus_mask True
        imagebutton auto "Pal/Icons/save_%s.png" action ShowMenu("save"):
            focus_mask True
        imagebutton auto "Pal/Icons/settings_%s.png" action ShowMenu("preferences"):
            focus_mask True






screen stats_screen():
    add "Pal/Screens/stats_screen.png"
    zorder 100
    modal True
    vbox xalign 0.99:
        spacing 10
        imagebutton auto "Pal/Buttons/stats_button_%s.png" action [SetVariable("myLoc", "stats"), SelectedIf(myLoc== "stats"), Hide("stats_screen"),Show("stats_screen")]:
            focus_mask True
        # imagebutton auto "Pal/Buttons/inventory_button_%s.png" action NullAction():
        #     focus_mask True
        imagebutton auto "Pal/Buttons/characters_button_%s.png" action [SetVariable("myLoc", "contacts"), SelectedIf(myLoc== "contacts"), Hide("stats_screen"),Show("contacts")]:
            focus_mask True
        # imagebutton auto "Pal/Buttons/lore_button_%s.png" action [SetVariable("myLoc", "lore"), SelectedIf(myLoc== "lore"), Hide("stats_screen"),Show("lore")]:
        #     focus_mask True
    imagebutton auto "Pal/Buttons/return_button_%s.png" action [Hide("stats_screen"), SetVariable("myLoc", None), Return()]:
        xalign 0.99 yalign 0.99
        focus_mask True
Any help would be greatly appreciated!

Post Reply

Who is online

Users browsing this forum: Google [Bot]