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.
Hey there guys! I have set this code in my game with one of the dialogues:
"But then, why did my hearing sound so off?"
"And why... {w}"
play audio "sounds/fear.ogg" noloop
extend "has it not ended ever since?{w=2.5}{nw}"
scene loliteroomday
stop audio
play audio "sounds/doorknock.ogg" noloop
l "Yes?"
l "Who is it?"
v "It's me. Open up, I made you breakfast."
The thing here is that the user has to click to advance after the "And why..." bit of dialogue, after which a sound plays. However, I wanted the second bit, the "has it not ended ever since?" to be a piece of dialogue that the user can't click to advance. It has to advance on its own with the {nw} after the {w=3.0} wait function.
Right now, I can click during this and it would ruin the setup of the scene for me because the audio is supposed to end only after the dialogue ends, so if the user clicks and continues, the audio will continue playing.
I usually show screen with transparent button, taking all screen, doing nothing. It would intercept all clicks. Then I hide it, when it is no longer needed.
Ocelot wrote: ↑Fri Feb 23, 2018 5:19 pm
I usually show screen with transparent button, taking all screen, doing nothing. It would intercept all clicks. Then I hide it, when it is no longer needed.
Hmm, I actually have that code defined. When I used it, it worked perfectly. It basically shows a screen like you said and it prevents clicking.