How to add music(in the game)and a background at start menu.
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.
- Ruubste
- Newbie
- Posts: 17
- Joined: Wed May 15, 2013 10:01 am
- Projects: BitterSweet, Destination
- Location: The Netherlands
- Contact:
How to add music(in the game)and a background at start menu.
Yeah, it's me (that noob) again. I found out how to make choices, dialogues etc. but when I try to add music I get stuck. Also, I can't even find where to put a background in the start menu. Could someone please help me?
Learn to smile at every situation. See it as an opportunity to prove your strength and ability.
Have a nice day
Have a nice day
- SakuraTommiko
- Newbie
- Posts: 21
- Joined: Fri May 17, 2013 9:54 am
- Location: Philippines
- Contact:
Re: How to add music(in the game)and a background at start m
well, for the music, if you're using ren'py, put:
play music "(the name of the song).(the sound format)"
before the line where you want the music to begin. Then put:
stop music "(the name of the song).(the sound format)"
after the line where you want the music to stop.
As for sound effects, just change "music" to "sound". However, it only plays once. So if you'd like to repeat it for several times, you'll need to repeat the line to how many time you'd want it to play.
As for the picture on the main menu, that's also my question... haha! So I'm sorry if I could only help you in the music. I hope this helped you!
Ah, and don't forget to put the music file into the folder of your game. Also, the name you put in the code should be the exact one, that also goes with the format. So if you'd like it to be simpler, just rename the file. If you'd like to see what the format is, just place your mouse onto the song, and a box will appear containing the details.
Sakura Tommiko
play music "(the name of the song).(the sound format)"
before the line where you want the music to begin. Then put:
stop music "(the name of the song).(the sound format)"
after the line where you want the music to stop.
As for sound effects, just change "music" to "sound". However, it only plays once. So if you'd like to repeat it for several times, you'll need to repeat the line to how many time you'd want it to play.
As for the picture on the main menu, that's also my question... haha! So I'm sorry if I could only help you in the music. I hope this helped you!
Ah, and don't forget to put the music file into the folder of your game. Also, the name you put in the code should be the exact one, that also goes with the format. So if you'd like it to be simpler, just rename the file. If you'd like to see what the format is, just place your mouse onto the song, and a box will appear containing the details.
Sakura Tommiko
- Ruubste
- Newbie
- Posts: 17
- Joined: Wed May 15, 2013 10:01 am
- Projects: BitterSweet, Destination
- Location: The Netherlands
- Contact:
Re: How to add music(in the game)and a background at start m
Thank you, actually I already figured it out a bit but can you solve another problem?SakuraTommiko wrote:well, for the music, if you're using ren'py, put:
play music "(the name of the song).(the sound format)"
before the line where you want the music to begin. Then put:
stop music "(the name of the song).(the sound format)"
after the line where you want the music to stop.
As for sound effects, just change "music" to "sound". However, it only plays once. So if you'd like to repeat it for several times, you'll need to repeat the line to how many time you'd want it to play.
As for the picture on the main menu, that's also my question... haha! So I'm sorry if I could only help you in the music. I hope this helped you!
Ah, and don't forget to put the music file into the folder of your game. Also, the name you put in the code should be the exact one, that also goes with the format. So if you'd like it to be simpler, just rename the file. If you'd like to see what the format is, just place your mouse onto the song, and a box will appear containing the details.
Sakura Tommiko
If you want to use a background you first have to put: Image (name background), in the begining of the script. What do you have to put there instead of image when you want to put music?
Learn to smile at every situation. See it as an opportunity to prove your strength and ability.
Have a nice day
Have a nice day
- Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- 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
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: How to add music(in the game)and a background at start m
To change the background of the menus look in your option.rpy for these lines:
mm means "main menu" and gm means "game menu"
To play a music in the main menu look for this line in options.rpy:
You can do many interesting things with sound.
Put these lines in the very beginning of your main script:
This code is registering a sound channel named "ambient". You can use it for sound effects that you will want to play in a continuous loop (like rain, wind or a clock ticking). You can use it with
you have many commands to control sound, like fadein, fadeout, queue, noloop and so on
http://www.renpy.org/wiki/renpy/doc/reference/Audio
Code: Select all
mm_root ="put the name of your image file here",
gm_root = "put the name of your image file here",To play a music in the main menu look for this line in options.rpy:
Code: Select all
config.main_menu_music = "put the name of your music file here"Put these lines in the very beginning of your main script:
Code: Select all
init:
$ renpy.music.register_channel("ambient","sfx",True,tight=True)Code: Select all
play ambient "name of your sound effects file"http://www.renpy.org/wiki/renpy/doc/reference/Audio
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- OokamiKasumi
- Eileen-Class Veteran
- Posts: 1779
- Joined: Thu Oct 14, 2010 3:53 am
- Completed: 14 games released -- and Counting.
- Organization: DarkErotica Games
- Deviantart: OokamiKasumi
- Location: NC, USA
- Contact:
Re: How to add music(in the game)and a background at start m
If you're interested in changing your Backgrounds, there's a tutorial for it in the RenPy Cookbook section of the forum.
[Tutorial] Custom Backgrounds: Save/Load/Pref/Yes-No/MainMenu
[Tutorial] Custom Backgrounds: Save/Load/Pref/Yes-No/MainMenu
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Most recent Games Completed:
- The Walk[Psychological][NanoWinter] ~ PG New!
- Trap! [ModernFantasy][VN] ~ PG16
- The Adventures of Prince Ivan [Fant/Adv/VN] ~ PG
"No amount of great animation will save a bad story." -- John Lasseter of Pixar
Who is online
Users browsing this forum: Google [Bot]
