Changing Main Menu Music
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.
- SpagootBoi
- Regular
- Posts: 25
- Joined: Sun Mar 22, 2020 12:02 am
- Completed: Infatuation (Visual Novel Adaptation), Kimbark Street
- Projects: Canyonlands: American Folklore, True Two Heart (Restoration Project)
- Tumblr: plant324
- itch: plantmama
- Contact:
Changing Main Menu Music
Hello! I wanted to know if it was possible to change the main menu music through the use of persistent variables? Thanks to any help I get!
- hell_oh_world
- Miko-Class Veteran
- Posts: 777
- Joined: Fri Jul 12, 2019 5:21 am
- Contact:
Re: Changing Main Menu Music
You can, just configure the config.main_menu_music during init time.
or
Code: Select all
init python:
if persistent.unlocked_item_1:
config.main_menu_music = "alternative_music_1.mp3"
elif persistent.unlocked_item_2:
config.main_menu_music = "alternative_music_2.mp3"
Code: Select all
init python:
if not persistent.main_menu_music:
persistent.main_menu_music = "default_music.mp3"
config.main_menu_music = persistent.main_menu_music
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Changing Main Menu Music
A simpler way would be to play the music when the main menu screen shows and adjust it there - no need to mess with init
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: No registered users