Ren'Py [SOLVED]Screen Between 2 say statement

GoldenD

Member
Sep 30, 2018
102
70
Well,

goal is to present game rules and in the same time to build the character. The simple example is :
Python:
label setupGame:
    speaker "rule 1.."
    speaker "rule 2.."
    speaker "Choose your items  in the next screen :"
# For Test, I used screen confirm thinking i just have to do this kind of screen
# Goal here is to show a first setupScreen
    show screen confirm(message="test", yes_action=Hide('confirm', dissolve), no_action=Hide('confirm', dissolve))
    speaker "rule 3.."
    speaker "Choose your weapons :"
    show screen weaponsScreen()
    .../...
How can i have the screen without the next statement being executed
 
Last edited:

GoldenD

Member
Sep 30, 2018
102
70
I tried this :
Python:
.../...
speaker "Choose your items  in the next screen :"
call screen setupHero()
speaker "rule 3.."
.../...

screen setupHero():
    use confirm(message="test", yes_action=Hide('confirm', dissolve), no_action=Hide('confirm', dissolve))
The next say statement seems to wait, but buttons of screen confirm don't execute action.
In fact when i use "use", confirm screen is no more modal !
 
Last edited:

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,667
23,782
why don't you just call the confirm screen?
Python:
label start:
    call screen confirm("test", [Return(True), With(dissolve)], [Return(False), With(dissolve)])
    "[_return]"
you basically try to hide the via use included confirm screen but the interaction (the screen setupHero) remains.
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,490
7,035
I tried this :
Python:
.../...
speaker "Choose your items  in the next screen :"
call screen setupHero()
speaker "rule 3.."
.../...

screen setupHero():
    use confirm(message="test", yes_action=Hide('confirm', dissolve), no_action=Hide('confirm', dissolve))
The next say statement seems to wait, but buttons of screen confirm don't execute action.
In fact when i use "use", confirm screen is no more modal !
the66 has you on the correct trail, but I figured I'd add some general rambling:

When you "call" a screen, Ren'py will not move forward in the script. The way to then dismiss the screen and move forward in the script is to have a "Return" action in the screen and have something (a button or whatever) execute it.

This is as opposed to when you "show" a screen, and then "hide" it. If you do a "hide" on a screen that you've "call"ed, the screen may go away, but execution won't resume.

So, basically, "call/Return" are a pair, and "show/hide" are a pair, but when you mix them you usually don't get what you want.
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,667
23,782
besides the show/call problematic, you can't hide screens with Hide(), that are shown via the use statement, the inner screen simply doesn't exists as separate screen. and even if it would, the inner screen is instantly shown again as part of the outer screen.
if you need to hide the inner screen, use a flag for it, something like that:
Python:
screen outer():

    default inner = True

    text "outer screen" align (.5, .1)

    if inner:
        use inner

    vbox  align (.5, .9):
        textbutton "hide inner screen via Hide()" action Hide("inner") # doesn't work
        textbutton "hide outer screen" action Return()

screen inner():
    frame:
        align (.5, .5)

        has vbox
        text "inner screen" xalign .5
        textbutton "hide inner screen via Hide()" action Hide("inner") # doesn't work
        textbutton "hide inner screen via flag" action SetScreenVariable("inner", False)

label start:
    call screen outer
 

GoldenD

Member
Sep 30, 2018
102
70
Ok, it works fine.
Have to learn your differents comments and it'll be good.
Thanks a lot and have a good day.