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.
-
YossarianIII
- Veteran
- Posts: 382
- Joined: Tue Jan 13, 2015 10:26 pm
- Completed: Guns & Lovers; SRRT!; Kill Your Refrigerator; Banality Man; Beretta Mondatta
- Projects: Solidarity Forever
- Organization: KONOL Games
-
Contact:
#1
Post
by YossarianIII » Thu Jan 19, 2017 7:57 pm
What code would I use if I wanted a looping sound effect that only plays while the VN is skipping?
I was able to get a sound effect to play by just adding this code in the skip indicator section of the screens document:
Code: Select all
timer .05 action Play("sound", "fx skip", loop=True)
This is wrong, though, because the sound keeps looping after the VN stops skipping. How can I make it play the sound only while the skip indicator is visible? (Similar to the way dialogue voice blips only play while text is being displayed.)
Thanks!
-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom » Fri Jan 20, 2017 1:46 am
Perhaps in the skip screen:
Code: Select all
on "show" action Play("sound", "fx skip", loop=True)
on "hide" action Stop("sound")
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
-
YossarianIII
- Veteran
- Posts: 382
- Joined: Tue Jan 13, 2015 10:26 pm
- Completed: Guns & Lovers; SRRT!; Kill Your Refrigerator; Banality Man; Beretta Mondatta
- Projects: Solidarity Forever
- Organization: KONOL Games
-
Contact:
#3
Post
by YossarianIII » Fri Jan 20, 2017 1:16 pm
PyTom wrote:Perhaps in the skip screen:
Code:
on "show" action Play("sound", "fx skip", loop=True)
on "hide" action Stop("sound")
Yes, perfect! This'll help for some of the other screens too. Thanks!
Users browsing this forum: No registered users