[SOLVED]Music Continue
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.
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
[SOLVED]Music Continue
Hi Friends
The music stops as soon as we change labels or there is a choice, is there a way to play the music continuously and stop it only as I want.
The music stops as soon as we change labels or there is a choice, is there a way to play the music continuously and stop it only as I want.
Last edited by senisanti on Thu Oct 24, 2019 2:14 pm, edited 3 times in total.
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Music Continue
Can you show us the code exactly? That'll much give information about your problem.
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
Re: Music Continue
I put this code before the label start
I can't put the cutscene on because the music stops.
Code: Select all
label splashscreen:
play music "tropicalflow.MP3"
scene first
with Dissolve(.95)
pause 4.95
scene first2
with Dissolve(.95)
pause 8.95
scene black
"Do you agree the rules?"
menu:
"Yes":
return
"No":
$ renpy.quit()
return
label before_main_menu:
$ renpy.movie_cutscene("santirosa.mpg")
call screen main_menu
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Music Continue
trysenisanti wrote: ↑Sun Oct 20, 2019 12:49 pm I put this code before the label start
I can't put the cutscene on because the music stops.Code: Select all
label splashscreen: play music "tropicalflow.MP3" scene first with Dissolve(.95) pause 4.95 scene first2 with Dissolve(.95) pause 8.95 scene black "Do you agree the rules?" menu: "Yes": return "No": $ renpy.quit() return label before_main_menu: $ renpy.movie_cutscene("santirosa.mpg") call screen main_menu
$ renpy.movie_cutscene("santirosa.mpg", stop_music=False)
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
Re: Music Continue
Doesn't worked.
with a different organization, can I manage to put everything in the same block?
After a few works more, i've found this
play movie is better than cutscene
Now i've the movie and the music tougther.
but i've already few problems:
the first image "scene first" don't apear...
and the music stop when i come to the main menu, i d'on't wan't she stop now, i want the music stop only when the game start...
how can'i ressolve this two problems?
with a different organization, can I manage to put everything in the same block?
After a few works more, i've found this
play movie is better than cutscene
Code: Select all
label splashscreen:
play music "tropicalflow.MP3"
play movie "santirosa.mpg"
scene first
with Dissolve(.95)
pause 4.95
scene first2
with Dissolve(.95)
pause 8.95
scene black
"Do you agree the rules?"
menu:
"Yes":
call screen main_menu
"No":
$ renpy.quit()
label before_main_menu:
call screen main_menu
but i've already few problems:
the first image "scene first" don't apear...
and the music stop when i come to the main menu, i d'on't wan't she stop now, i want the music stop only when the game start...
how can'i ressolve this two problems?
Re: Music Continue
If "first2" appears that a pause between play movie and scene first would allow "first" to be displayed ?
Why a call, and not a jump label main_menu? Maybe it would work?
Why a call, and not a jump label main_menu? Maybe it would work?
English is not my native language; please excuse typing errors.
- isobellesophia
- Miko-Class Veteran
- Posts: 979
- Joined: Mon Jan 07, 2019 2:55 am
- Completed: None
- Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
- Organization: Friendly Teachers series
- Deviantart: SophBelle
- itch: Child Creation
- Location: Philippines, Mindanao
- Contact:
Re: Music Continue
Call functions is actually calling a screen, unless you'll click it or press it to continue.
While label is just a label with a normal dialogue to put on.
Main menu has a label itself as pyPat said, it will jump into the main menu label.
Maybe you'll try it for a chance.
While label is just a label with a normal dialogue to put on.
Main menu has a label itself as pyPat said, it will jump into the main menu label.
Code: Select all
label before_main_menu:
jump main_menu
label main_menu:
"Aaa."
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
Re: Music Continue
No it doesn't work, if I put jump there is no main menu, after the jump I see the Aaa with a black screen and the game starts automatically.
And with a "pause" between the movie and the fist it doesn't work.
And with a "pause" between the movie and the fist it doesn't work.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- 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: Music Continue
I've been following this discussion and I am slightly confused about what exactly are you wanting to achieve. If the only problem is the music stopping when leaving a label, try simply playing the same music in the other label. Chances are the music won't restart, but will continue playing seamlessly until you command it to stop.
In most of my games (The Other Question is a good example), I like to have a song that starts in the splash screen label, continues playing through the main menu, and ends with a fade after the game has started. To achieve this I simply start the song normally in the splash screen. When the game reaches the main menu, Ren'Py finds out the defined "main menu music" is the same song that's already playing and just keeps playing it.
Code: Select all
## Music that is played while the user is at the main menu.
config.main_menu_music = "bgm/yeah.OGG"
Code: Select all
label splashscreen:
scene black
show splash:
truecenter
with Dissolve(1.0)
play music "bgm/yeah.OGG"
scene black
with Dissolve(2.0)
return
Code: Select all
# The game starts here.
label start:
stop music fadeout 2.0
scene classroom
"Well, professor Eileen's lecture was interesting."
Code: Select all
add "image_name"
Code: Select all
menu:
"Yes":
return #return should close the splash screen and proceed to the main menu, but I never tested it
"No":
$ renpy.quit() # that's fine, although quitting the program suddenly may upset the player
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
Re: Music Continue
Congratulations Donmai.
you understood very well what I wanted, my English is bad and the translator is not good. "smiley yellow"
the technique of putting the identical music on the option file and on the splashscreen works very well.
that's the main thing I wanted to do.
the code still has problems.
yes, it is possible to put a video and a music at the same time.
with this method he plays music and video at the same time.
but it deletes one of the first two images.
With my whole code, I make two images appear after the video, if I put the video only one image appears, if I do not put the video both images appear.
I don't understand why and the PyPat technique, "pause" doesn't work
I would also like to prevent the players from clicking and passing the images and video because it displays the rules and right after I ask if they accept these rules, so I want to block the scrolling so that the player is forced to read.
I tried with the "block" "clickable"... and other stuff but I failed.
I don't understand with add, I have a mistake that tells me "sayer add isn't defined"
you understood very well what I wanted, my English is bad and the translator is not good. "smiley yellow"
the technique of putting the identical music on the option file and on the splashscreen works very well.
that's the main thing I wanted to do.
the code still has problems.
yes, it is possible to put a video and a music at the same time.
Code: Select all
play music "tropicalflow.MP3"
play movie "santirosa.mpg"
with this method he plays music and video at the same time.
but it deletes one of the first two images.
Code: Select all
label splashscreen:
play music "tropicalflow.MP3"
play movie "santirosa.mpg"
scene first
with Dissolve(.95)
pause 4.95
scene first2
with Dissolve(.95)
pause 8.95
scene black
"Do you agree the rules?"
menu:
"Yes":
call screen main_menu
"No":
$ renpy.quit()
label before_main_menu:
call screen main_menu
I don't understand why and the PyPat technique, "pause" doesn't work
I would also like to prevent the players from clicking and passing the images and video because it displays the rules and right after I ask if they accept these rules, so I want to block the scrolling so that the player is forced to read.
I tried with the "block" "clickable"... and other stuff but I failed.
I don't understand with add, I have a mistake that tells me "sayer add isn't defined"
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- 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: Music Continue
Oops! My fault!
We only use "add" to show images on screens. Instead of "scene", you can simply use "show" (as in my example splash screen code).
(Silly me. Yes, the scene command works well on a splash screen. I've been using it for years... )
Probably a silly question, but have you tried inserting a pause before showing the images?
https://www.renpy.org/dev-doc/html/othe ... enpy.pause
BTW, not a native English speaker here, also.
We only use "add" to show images on screens. Instead of "scene", you can simply use "show" (as in my example splash screen code).
(Silly me. Yes, the scene command works well on a splash screen. I've been using it for years... )
Probably a silly question, but have you tried inserting a pause before showing the images?
https://www.renpy.org/dev-doc/html/othe ... enpy.pause
BTW, not a native English speaker here, also.
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
Re: Music Continue
Yes pyPat has proposed this idea but it doesn't work.Donmai wrote: ↑Tue Oct 22, 2019 10:51 am Oops! My fault!
We only use "add" to show images on screens. Instead of "scene", you can simply use "show" (as in my example splash screen code).
(Silly me. Yes, the scene command works well on a splash screen. I've been using it for years... )
Probably a silly question, but have you tried inserting a pause before showing the images?
https://www.renpy.org/dev-doc/html/othe ... enpy.pause
BTW, not a native English speaker here, also.
I''ve succedeed, pause 4.95 don't work, but pause 8.95 work fine ???
The last probleme now...
I still haven't been able to find out how to prevent the player from clicking to move the images forward, I want him to be forced to read...
I'm sure blocking the mouse click exists, I saw it somewhere but I can't find it anymore.
- senisanti
- Regular
- Posts: 94
- Joined: Tue May 07, 2019 4:37 am
- Projects: Allball, Smash scrap metal, Santi...
- Location: Rennes
- Contact:
Re: Music Continue
Up!
Nobody know the soluce?
I still haven't been able to find out how to prevent the player from clicking to move the images forward, I want him to be forced to read...
I'm sure blocking the mouse click exists, I saw it somewhere but I can't find it anymore.
Nobody know the soluce?
I still haven't been able to find out how to prevent the player from clicking to move the images forward, I want him to be forced to read...
I'm sure blocking the mouse click exists, I saw it somewhere but I can't find it anymore.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- 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: Music Continue
Remember that forcing someone to do something is always a no-no...
But if you look at the documentation link I gave you you will see there is a hard pause option.
Set it to True andthe mouse click user interaction will be disabled during the pause. Of course, loooooong pauses will make the player believes the program crashed.
But if you look at the documentation link I gave you you will see there is a hard pause option.
Set it to True and
Code: Select all
$ renpy.pause(12, hard=True)
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3791
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Music Continue
12 seconds is an extremely long time for a pause
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: Google [Bot]