[Solved] Fade out main menu?
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.
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
[Solved] Fade out main menu?
So, as the title says, I want to fade out the main menu before the start of the game.
The idea being that the music fades at the same time the audio does, so the transition isn't so jarring.
I imagine I need to add something to screens.rpy?
Or transitions.rpy and then do an "at" statement in screens?
As always, any and all help is always appreciated.
The idea being that the music fades at the same time the audio does, so the transition isn't so jarring.
I imagine I need to add something to screens.rpy?
Or transitions.rpy and then do an "at" statement in screens?
As always, any and all help is always appreciated.
Last edited by TRIDENT_12 on Sat Jan 29, 2022 5:42 am, edited 1 time in total.
- m_from_space
- Miko-Class Veteran
- Posts: 941
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Fade out main menu?
You actually don't have to do much for it. Something like this should suffice:
Code: Select all
label start:
stop music fadeout 1.0
scene black
with Dissolve(1.0)
...
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
I did try thatm_from_space wrote: ↑Tue Jan 25, 2022 6:56 am You actually don't have to do much for it. Something like this should suffice:
Code: Select all
label start: stop music fadeout 1.0 scene black with Dissolve(1.0) ...
And I got this error...
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 10, in script
with dissolve(3.0)
TypeError: 'Dissolve' object is not callable
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 10, in script
with dissolve(3.0)
File "renpy/ast.py", line 1443, in execute
renpy.exports.with_statement(trans, paired)
File "renpy/exports.py", line 1682, in with_statement
return renpy.game.interface.do_with(trans, paired, clear=clear)
File "renpy/display/core.py", line 2752, in do_with
clear=clear)
File "renpy/display/core.py", line 3315, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
File "renpy/display/core.py", line 3674, in interact_core
new_widget=layers_root)
TypeError: 'Dissolve' object is not callable
Windows-10-10.0.22000
Ren'Py 7.4.10.2178
LibitinaV2 1.0
Wed Jan 26 19:28:17 2022
- Ocelot
- Lemma-Class Veteran
- Posts: 2384
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Fade out main menu?
Spot the difference:
Code: Select all
# ↓ m_from_space suggestion (with timing correction)
with Dissolve(3.0)
with dissolve(3.0)
# ↑ your code
< < insert Rick Cook quote here > >
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
Even after that it jumps straight into the game, regardless of the dissolve statement.Ocelot wrote: ↑Wed Jan 26, 2022 6:02 am Spot the difference:Code: Select all
# ↓ m_from_space suggestion (with timing correction) with Dissolve(3.0) with dissolve(3.0) # ↑ your code
The fact it already said "Dissolve" in the traceback, tells me capitalization doesn't matter (unless I'm using some transition I wrote, and then it does)
- Ocelot
- Lemma-Class Veteran
- Posts: 2384
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Fade out main menu?
That's wrong.TRIDENT_12 wrote: ↑Wed Jan 26, 2022 7:25 am The fact it already said "Dissolve" in the traceback, tells me capitalization doesn't matter (unless I'm using some transition I wrote, and then it does)
dissolve is an object of class Dissolve. In partivulat it is defined as dissolve = Dissolve(1.0). Trying to write dissolve(3.0) is like writing Dissolve(1.0)(3.0)
And for your problem. Try to trigger transition before starting the game. For example: action [With(Dissolve(3.0)), Start()]
< < insert Rick Cook quote here > >
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
So from what I'm gathering, spelling is important.Ocelot wrote: ↑Wed Jan 26, 2022 9:22 amThat's wrong.TRIDENT_12 wrote: ↑Wed Jan 26, 2022 7:25 am The fact it already said "Dissolve" in the traceback, tells me capitalization doesn't matter (unless I'm using some transition I wrote, and then it does)
dissolve is an object of class Dissolve. In partivulat it is defined as dissolve = Dissolve(1.0). Trying to write dissolve(3.0) is like writing Dissolve(1.0)(3.0)
I thought I only had to be mindful of spelling when writing variables, and user-defined transitions and stuff.
I tried that (making sure of my spelling and capitalization) and it faded.
But only for 0.25 seconds instead of the 3 seconds I'd specified.
What am I doing wrong?
Code: Select all
textbutton _("Start") action [With(Dissolve(3.0)), Start(persistent.chapter[-1])]
- Ocelot
- Lemma-Class Veteran
- Posts: 2384
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Fade out main menu?
at the label where you want to start, add pause 3 statement. If you want to dissolve into specific image, show it before pause:
Code: Select all
# NOT scene, it is basically clear + show + with. And we don't need the last one there
show background
pause 3
< < insert Rick Cook quote here > >
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
This worked brilliantly!Ocelot wrote: ↑Thu Jan 27, 2022 4:18 am at the label where you want to start, add pause 3 statement. If you want to dissolve into specific image, show it before pause:Code: Select all
# NOT scene, it is basically clear + show + with. And we don't need the last one there show background pause 3
Thank you so much!
But for some reason I can't fade out the main menu music at the same time as we fade out the main menu.
Is that even possible?
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
Like this
Code: Select all
$ renpy.music.stop(channel="music", fadeout=3)
- Ocelot
- Lemma-Class Veteran
- Posts: 2384
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Fade out main menu?
I mean, where in your script it is, relative to script start, pause, show statements, etc.
< < insert Rick Cook quote here > >
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
Whoops
My bad
I'm sorry, I misunderstood.
Code: Select all
label start:
pause 3
$ renpy.music.stop(channel="music", fadeout=3)
$ s_name = "Sarah"
$ k_name = "???"
$ a_name = "???"
$ style.say_dialogue = style.normal
if persistent.act == 1:
menu:
"Do you want to skip to the end?"
"Yes":
jump credits
"No":
pass
menu:
"Do want to go to act 2?"
"Yes":
$ persistent.act = 2
jump ch21
"No":
pass
It faded out the music, and then paused.
- Ocelot
- Lemma-Class Veteran
- Posts: 2384
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Fade out main menu?
This is strange, because both ways to stop music works for me:
If you still having issues with pause taking longer than it should, you can try to make pause shirter to compensate for time lost on fadeout.
Code: Select all
# in screens:
# textbutton _("Start") action [With(Dissolve(3.0)), Start()]
define config.main_menu_music = "audio/Clock_All.wav"
image bg room = Solid('00FF00')
label start:
# stop music fadeout 3
$ renpy.music.stop(channel="music", fadeout=3)
show bg room
pause 3
show eileen happy
"You've created a new Ren'Py game."
"Once you add a story, pictures, and music, you can release it to the world!"
return
< < insert Rick Cook quote here > >
-
- Regular
- Posts: 30
- Joined: Tue Aug 03, 2021 4:29 pm
- Projects: The Monster Within
- Github: TRIDENT1313
- Discord: TRIDENT_12#2285
- Contact:
Re: Fade out main menu?
I did this
And it faded out the main menu at the same time as the music
But it forces me to click to continue, instead of running straight to the choice.
I have the dissolve in screens.
The c2c is kinda annoying, and I can't have a {nw} in there, obviously.
Any ideas?
Sorry to be such a pain
Code: Select all
label start:
pause 3 and renpy.music.stop(channel="music", fadeout=3)
But it forces me to click to continue, instead of running straight to the choice.
I have the dissolve in screens.
The c2c is kinda annoying, and I can't have a {nw} in there, obviously.
Any ideas?
Sorry to be such a pain
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Ocelot