[solved]How to make music change affect returning to main menu from music room
Posted: Tue Sep 21, 2021 10:46 pm
Hello! Sorry for the wordy subject line, but my issue is as follows.
After passing a certain point in the game, the main menu music (and background image) changes. I accomplished this with this code in the script:
In the music room code, this is used to change the music back when the player returns to the main menu.
How can I make the file 'wa.ogg' play if persistent.op2 isn't true yet in the music room?
Additionally (I will move this part into another topic if necessary) I have a ton of songs in my music room and I'd like to implement a scroll bar, but all information I've found on the subject has broken the code or caused crashes. This is what I have right now (it all barely fits)
https://media.discordapp.net/attachment ... nknown.png
After passing a certain point in the game, the main menu music (and background image) changes. I accomplished this with this code in the script:
Code: Select all
label before_main_menu:
if persistent.op2:
$ renpy.music.play('audio/gs.ogg', channel='music', loop=True)
else:
$ renpy.music.play('audio/wa.ogg', channel='music', loop=True)
return main_menu
Code: Select all
# Restore the main menu music upon leaving.
on "replaced" action Play("music", "audio/gs.ogg")
Additionally (I will move this part into another topic if necessary) I have a ton of songs in my music room and I'd like to implement a scroll bar, but all information I've found on the subject has broken the code or caused crashes. This is what I have right now (it all barely fits)
https://media.discordapp.net/attachment ... nknown.png