Let the music play after the game is finished?
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.
- Sheridan
- Regular
- Posts: 77
- Joined: Sat Nov 03, 2012 9:18 am
- Completed: Tea & Sympathy, 51 cards
- Contact:
Let the music play after the game is finished?
Is there a way to keep the music playing after the game is finished and you return to the menu? I don't want to start the piece over, since it's rather long; I just want it to continue playing after the end of the credits.
Thanks!
Thanks!
- saguaro
- Miko-Class Veteran
- Posts: 560
- Joined: Sun Feb 12, 2012 9:17 am
- Completed: Locked-In, Sunrise, The Censor
- Organization: Lucky Special Games
- itch: saguarofoo
- Location: USA
- Contact:
Re: Let the music play after the game is finished?
There is no pause/resume for music that I am aware of. If you know exactly how long the music plays during the credits, you could set up the main menu to play a shortened version that picks up where the credits version leaves off after the game is beaten. You'd need a persistent variable to trigger this.
- Sheridan
- Regular
- Posts: 77
- Joined: Sat Nov 03, 2012 9:18 am
- Completed: Tea & Sympathy, 51 cards
- Contact:
Re: Let the music play after the game is finished?
Bummer. I can't do something based on how long the credits are, since it's the same piece playing through the whole game (it's a long piece of music and a very short kinetic novel). But I think I can work something out. Thanks!
Re: Let the music play after the game is finished?
Use Play function with if_changed=True, maybe?
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.
- Sheridan
- Regular
- Posts: 77
- Joined: Sat Nov 03, 2012 9:18 am
- Completed: Tea & Sympathy, 51 cards
- Contact:
Re: Let the music play after the game is finished?
I'm not sure how to do this. What I worked out so far is:Levrex wrote:Use Play function with if_changed=True, maybe?
Where [music] is a bit of the BGM that I've chopped off and saved as a separate file. But that only plays the music upon restarting the game, not upon returning to the menu after the end credits.if persistent.ending == "End":
config.main_menu_music = "[music]"
Re: Let the music play after the game is finished?
If it is stored in init python hide part, then of course.Sheridan wrote:I'm not sure how to do this. What I worked out so far is:Levrex wrote:Use Play function with if_changed=True, maybe?
Where [music] is a bit of the BGM that I've chopped off and saved as a separate file. But that only plays the music upon restarting the game, not upon returning to the menu after the end credits.if persistent.ending == "End":
config.main_menu_music = "[music]"
Well, it's pretty understandable that you don't know, it ain't documented nowhere.
It's the same as this, just can be put into screens as an action.
http://www.renpy.org/wiki/renpy/doc/ref ... music.play
Code: Select all
on "show" action Play("music", NAMEOFYOURMUSICGOESHERE, loop=True, fadeout=0.5, if_changed=True)
on "replace" action Play("music", NAMEOFYOURMUSICGOESHERE, loop=True, fadeout=0.5, if_changed=True)
1) Change your main menu upon completion as read here:
http://www.renpy.org/wiki/renpy/doc/coo ... g_the_game
(The step isn't required if your main menu music is not changed, whether you complete the game or not.)
2) Put the above actions in that one main menu screen which will the player see when he completes the game.
If your question is solved, please add [Solved] to theme's name by editing its first post, so that the helpful guys out there wouldn't mistakenly think the problem is still unanswered and waste their time.
- Sheridan
- Regular
- Posts: 77
- Joined: Sat Nov 03, 2012 9:18 am
- Completed: Tea & Sympathy, 51 cards
- Contact:
Re: Let the music play after the game is finished?
Thank you so much! This isn't exactly what I envisioned but it's very, very close.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]