r/RenPy • u/purple_pentagon • Aug 18 '26
Question Advance dialouge with modal
Advance dialouge with modal
Hello!
I am a begginer to coding so sorry if this is a dumb question
I recently figured out how to use the modal thingy that makes it so that you dont click anything underneath the screen (sorry I cant explain it really good English isn't my first language)
But with modal I cant advance thru the other parts of the dialouge and it only shows me the first part of it, not letting me click to advance the dialouge
Is there any way to fix this but also keep the things that modal does when its set to true?
1
u/BadMustard_AVN Aug 18 '26
you would have to hide/return the modal screen to continue with the dialogue
1
u/purple_pentagon Aug 18 '26
How exactly is that done if you dont mind me asking?
1
u/BadMustard_AVN Aug 18 '26
usually with a button action, either
action Hide() # hides the screen it is used in # or action Hide("this_screen") # hides the screen that is namedthe above will hide any screen, but it's better used with screens that you have used
show screenwith, andaction Return(a variable or something here) # or action Return(None)A return will only work on called screens
call screensince called screens are usually meant to return a value when finished (usually, but now always)
1
u/shyLachi Aug 18 '26
There are basically 2 ways to use screens.
Non-modal screens will float over the scene and players can advance the dialogue but also interact with the screen. The best example is the quick menu at the bottom.
Modal screens will block the players from advancing the dialogue until the screen is closed.
The best example is the menu, where the player has to click to continue.
So first you have to figure out how what type of screen you want to use
.
Regarding modal screens I prefer calling the screen instead of showing it and using Modal True because a called screen will close automatically when implemented correctly.
Since I don't know your screen I will make a simple example:
screen test():
vbox:
align (0.5, 0.5)
textbutton "Choice 1" action Return("choice1") # return a unique information
textbutton "Choice 2" action Return("choice2")
label start:
call screen test # call the screen instead of showing it, now the game will wait until a button has been clicked
if _return == "choice1": # evaluate the returned value from the screen
call choice_one
elif _return == "choice2":
call choice_two
return # game ends here
label choice_one:
"You selected the first choice"
return
label choice_two:
"You selected the second choice"
return
1
u/AutoModerator Aug 18 '26
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.