[SOLVED] Detect Dialogue Window Visibility

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
User avatar
Sharp Glimpse
Newbie
Posts: 7
Joined: Tue Dec 24, 2019 6:32 pm
Contact:

[SOLVED] Detect Dialogue Window Visibility

#1 Post by Sharp Glimpse »

Hello! This feels like a question everyone knows the answer to, but I'm still pretty new to Ren'Py and after hours of searching for a solution, I've finally decided to ask the question myself.

Basically, I want to make a button insensitive while a character is speaking (or while the dialogue window is visible). Then of course, when dialogue is completed, sensitivity should be restored. How would I go about coding this?

Thank you for any and all help!
Last edited by Sharp Glimpse on Tue Jul 07, 2020 8:51 am, edited 1 time in total.

nananame
Regular
Posts: 72
Joined: Fri Oct 13, 2017 1:40 pm
Contact:

Re: Detect Dialogue Window Visibility

#2 Post by nananame »

the dialogue window is the say screen (you can find it in the screens script).
the command for checking whether a screen is currently shown is renpy.get_screen("screenname")

so do:
if renpy.get_screen("say"):
bla bla

User avatar
Sharp Glimpse
Newbie
Posts: 7
Joined: Tue Dec 24, 2019 6:32 pm
Contact:

Re: Detect Dialogue Window Visibility

#3 Post by Sharp Glimpse »

nananame wrote: Tue Jul 07, 2020 3:35 am -snip-
Exactly what I was searching for! Thank you so much; it works perfectly.

Post Reply

Who is online

Users browsing this forum: No registered users