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.
This works great, but the problem is that if you open the main menu (by pressing the right mouse button) mid sentence, the text sound just loops forever unless you exit the menu screen, is there any way to make the typewriter sound automatically stop if the menu is opened?
screen save():
# This ensures that any other menu screen is replaced.
tag menu
on "show" action PauseAudio("typewriter", "toggle")
on "hide" action PauseAudio("typewriter", "toggle")
Thanks again for trying to help, Philat, but I've given that code a try and it doesn't have the effect I was hoping for. With your code, I press the right mouse button and no menu shows up at all... but what I was hoping to do was just stop the typewriter sound when a menu is opened, I'm sure there must be a way to do it, but I'm not too good with the coding side of things yet...
OK, so I've put it in the right place now, replacing the old two lines, and it kinda works but there's some unexpected side effects, for example, sometimes you click to enter the menu, but then after a second it will automatically exit the menu for no apparent reason...