I'm trying to simply play music without it looping. But, if you set the music playing loop to False in ANYWAY, it causes two problems:
Problem #1. If you rollback, the music stops playing.
Problem #2. If you load a save game, the music no longer plays.
However, if you set the music loop to True, in anyway, then the above two problems no longer occur, but now you're stuck with annoying music that loops over & over again.
So, how do you stop music looping, but without the above 2 problems from occurring?
How do you stop music from looping, without causing rollback to stop playing music, & ensure music plays after loading?
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.
- m_from_space
- Miko-Class Veteran
- Posts: 975
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: How do you stop music from looping, without causing rollback to stop playing music, & ensure music plays after loadi
I don't know about the rollback, but you could work around the loading problem by having a global variable keeping track of the current music.
Code: Select all
default background_music = "None"
label after_load:
if background_music != "None":
play music background_music fadein 1.0 noloop
return
label start:
$ background_music = "audio/mymusic.mp3"
play music background_music
...
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Ocelot