Hi everyone... I'm new here and I tried to find this question in other topics but I couldn't.
So what I want to do is to put a background music in the main menu that continues looping and then, when player clicks on 'start game', the music fades out and stops.
I tried using this...
config.main_menu_music = "bgm1.mp3"
but when I start a new game, the music keeps playing until it finishes
I know this question could be foolish, but it's my first time using ren'py
Thanks in advance...
How to fade out main menu music when click in start game
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 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.
-
- Miko-Class Veteran
- Posts: 733
- Joined: Fri Jul 07, 2006 9:58 pm
- Projects: Suna to Majo
- Location: France
- Contact:
I don't really know what you want to do. Fade out the music or make it stop?
In anycase, there's this old trick:
Stops all the musics.
I might be a little outdated, wasn't it supposed to be written instead ?
In anycase, there's this old trick:
Code: Select all
python hide:
if renpy.sound.is_playing(channel=7):
renpy.music.stop()
I might be a little outdated, wasn't it supposed to be written
Code: Select all
library.main_menu_music = "bgm1.mp3"
- PyTom
- Ren'Py Creator
- Posts: 16097
- 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:
You're a little outdated. A while back, I merged together config. and library., with config. being the preferred way of doing things.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Newbie
- Posts: 1
- Joined: Sun May 06, 2007 4:09 am
- Contact:
Thank you all for the help...
But as I dig more into ren'py more doubts come out...
This time I found the code to change the image buttons and labels
The problem I have...(this is going to sound totally stupid...) ...but, where am I supposed to put in this code...in script.rpy? options.rpy? or where?...Code: Select all
init: python: config.image_buttons["Save Game"] = ( "but_idle.png", "but_hover.png", "but_sel_idle.png", "but_sel_hover.png", "but_disable.png") config.image_labels["Music Volume"] = "lab_music_volume.png"
Sorry for my stupid questions
Indeed it was a stupid question
Ok...I managed to find out my mistake and how to correct it...
However...if I get stucked again with something I'll post it...
Who is online
Users browsing this forum: Majestic-12 [Bot], Semrush [Bot]