Ren'Py Stuck Dialogue

crukko22

Newbie
Apr 15, 2019
43
41
Hi Ren'Py, I'm trying to do something.

I have a screen with modal True. Inside this screen, there's an imagebutton. When I click it, it goes to another label where the MC needs to say something and then return to the current screen. But because modal is set to True, the dialogue never continues.

When I set the modal value to False, everything works as expected. However, when I click anywhere on the screen that isn't the imagebutton, it takes me back to the main menu.

To address this issue, I've been using the $ renpy.pause(hard=True) command within the label. However, the problem persists: when I click on the screen, it seems to ignore the $ renpy.pause(hard=True) command and still returns me to the main menu.

Is there any solution for this?
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,940
7,261
Hi Ren'Py, I'm trying to do something.

I have a screen with modal True. Inside this screen, there's an imagebutton. When I click it, it goes to another label where the MC needs to say something and then return to the current screen. But because modal is set to True, the dialogue never continues.

When I set the modal value to False, everything works as expected. However, when I click anywhere on the screen that isn't the imagebutton, it takes me back to the main menu.

To address this issue, I've been using the $ renpy.pause(hard=True) command within the label. However, the problem persists: when I click on the screen, it seems to ignore the $ renpy.pause(hard=True) command and still returns me to the main menu.

Is there any solution for this?
Call the screen, do not show it.
 

crukko22

Newbie
Apr 15, 2019
43
41
Call the screen, do not show it.
Unfortunately, when I do this, I get a black screen, and then the UI disappears completely when I submit the dialogue.


Code:
label secondf_label:
    $ current_location = "secondf_label"
    $ renpy.checkpoint()
    $ display_location = "Hallway"

    call hide_ui_sc from _call_hide_ui_sc_4


    show screen top_ui_screen
    show screen timeui
    call screen secondfsc
    $ renpy.pause(hard=True)
Code:
screen secondfsc():

    modal False tag secondfsc

    add "secondf_background"
    imagebutton auto "kitchen_%s" action [Play("sound", "audio/open.ogg"), Call("kitchen_label_lock_check")] focus_mask True sensitive imagebutton_enabled_state1
    imagebutton auto "mcdoor_secondf_%s" action [Play("sound", "audio/open.ogg"), Jump("mcroom_label")] focus_mask True sensitive imagebutton_enabled_state1
Code:
label kitchen_label_lock_check:
    if not lock_kitch:
        $ imagebutton_enabled_state1 = False
        mc "Locked."
        $ imagebutton_enabled_state1 = True
        jump secondf_label
    else:
        jump kitchen_label
Here is a portion of the code. When I place the second screen code as the last line within the label, it displays without any issues. However, upon clicking the door, I encounter a black screen.
 

GrumpyMuffin

New Member
Aug 10, 2023
9
7
Hi Ren'Py, I'm trying to do something.

I have a screen with modal True. Inside this screen, there's an imagebutton. When I click it, it goes to another label where the MC needs to say something and then return to the current screen. But because modal is set to True, the dialogue never continues.

When I set the modal value to False, everything works as expected. However, when I click anywhere on the screen that isn't the imagebutton, it takes me back to the main menu.

To address this issue, I've been using the $ renpy.pause(hard=True) command within the label. However, the problem persists: when I click on the screen, it seems to ignore the $ renpy.pause(hard=True) command and still returns me to the main menu.

Is there any solution for this?
Perhaps you could use ui.interact instead of an imagebutton?