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.
And it works as a queue, but I can't figure out how to get the loop part to play as a loop without going back to lead after it's finished. I've tried hamfisting it but I can't get it to work with the regular statements for sound and music. Maybe I'm even less clever than I thought. Instead of looping the past point I've tried just having 10+ Loop.mp3s queued after Lead.mp3 but this is really tacky and I still have the next problem to deal with in that situation;
There's a millisecond cut of silence inbetween Lead and Loop. I know this isn't a part of the audio because I've tested it beforehand, it does this inbetween every other track too. Is there anyway to get rid of this? It sounds terrible and despite being really quick it's very noticeable. I'd try overlapping it a tiny fraction but if I knew how to get those statements to work too I probably wouldn't need to be asking this.
Do you really need to make it two separate files? Just have one file that's like 4-5 minutes long and play that from the beginning. Nobody is going to stay in the menu for that long anyway.
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
I was curious because I've never used the 'before_main_menu' label before. Tried this code and it actually played the music pieces correctly, but it also started the game before showing the main_menu.
Adding a 'return' apparently solved the problem. Is this the right thing to do?
Unlike python functions, ren'py label continues to the next label. Thus all labels should be ended with return or jump. I just forgot it to write it.
label before_main_menu was important for adding animating background on the main menu before 6.18 because of screen performance issue.
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Hi! So. New here. Also new to coding. I'm also wanting to include bgm to the main menu, like OP. However, I'm not able to get my music to play.
I have made a bgm subfolder in the game directory.
I have attempted to play my file through the options page, via config.main_menu_music = "gypsy_shoegazer.mp3" (and have removed the # in accordance with keeping code in line).
I have also gone to the script page and tried to use the aforementioned label before_main_menu
. . . And neither have successfully worked. I will return to my main menu just fine, but no music will play. I'm not quite sure how to fix this? A detailed description of what to do would be most appreciated. <3
if you file is in a folder called "bgm" that is in the game folder, then you need to indicate that in the file name, like so: "bgm/gypsy_shoegazer.mp3"
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Hi there!
I rewrote it to bgm/gypsy_shoegazer.mp3; however, my game still remained silent in the opening page. So, I went to my mp3 file to make sure the name was right and it told me the name was Gypsy Shoegazer.mp3
I rewrote it to be bgm/Gypsy Shoegazer.mp3 just to see if it would work, but as guessed, it told me it couldn't find it. So I changed it back and it led me to the main menu. . . but still no sound. And my file plays just fine outside of ren'py so I'm not sure what to try next.
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Check that you haven't muted your music channel by accident (look on your preferences screen).
If you downloaded the music file without renaming it, then use
Thanks, Donmai. I checked on the prefs menu and the music volume is all the way up. I copied your code into my script and. . . it still isn't playing. But it didn't tell me it couldn't find the song, so that's a step in the right direction at least. Do you have anything else for me to try?
paper
edit:: I tried a different song and refreshed. Then it told me it couldn't find shoegazer? So I refreshed again, saving ALL open scripts, not just the one I was working on. And my new song suddenly worked. . . So I went through all the scripts trying to find out what was wrong, though I couldn't see anything else pertaining to sound.
Moral of the story: save everything?
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
It's me again. . . I feel as though I've taken over this thread but I still have a relevant question.
It occurred to me that my main menu music plays over the entire game. I tried to insert music into the actual gameplay but lo, the main menu music has taken over!!
So what I'm asking is. . . how do I make it stop?!
Has anyone else ever had this happen? How should I fix it?
edit::
I should probably search more thoroughly before asking questions.