Can't get an ending screen to work
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.
-
- Newbie
- Posts: 5
- Joined: Tue May 07, 2019 7:26 pm
- Contact:
Can't get an ending screen to work
I've added a bad ending to my game, but I have no idea how to make it a click to continue screen. Yes, I've read the Ren'py Documentation on the matter, but I don't know how to program very well. Also, it shows the text box during the few seconds that it shows the screen. Any ideas? Thanks in advance.
Edit: I should mention that the ending screen is a still image file that I want to be click to continue on, without a textbox. I want it to have a line of dialogue, followed by a fade to black, followed by a fade to the image with the music playing in the background, and it just shows the image and plays the music until the player clicks.
Edit: I should mention that the ending screen is a still image file that I want to be click to continue on, without a textbox. I want it to have a line of dialogue, followed by a fade to black, followed by a fade to the image with the music playing in the background, and it just shows the image and plays the music until the player clicks.
- 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: Can't get an ending screen to work
You could make a screen that catches the mousebutton click and make the the program jump to a certain label (or some other action you want to have.)rocket_shot wrote: ↑Mon May 13, 2019 4:25 pm I've added a bad ending to my game, but I have no idea how to make it a click to continue screen. Yes, I've read the Ren'py Documentation on the matter, but I don't know how to program very well. Also, it shows the text box during the few seconds that it shows the screen. Any ideas? Thanks in advance.
Edit: I should mention that the ending screen is a still image file that I want to be click to continue on, without a textbox. I want it to have a line of dialogue, followed by a fade to black, followed by a fade to the image with the music playing in the background, and it just shows the image and plays the music until the player clicks.
Code: Select all
screen catchMB():
key "mousedown_1" action Jump("nameOfLabel")
-
- Newbie
- Posts: 5
- Joined: Tue May 07, 2019 7:26 pm
- Contact:
Re: Can't get an ending screen to work
where do i put that? under screens.rpy? if so, how would i apply it? and how do i make it return to the main menu on mouse click?Per K Grok wrote: ↑Mon May 13, 2019 6:03 pm You could make a screen that catches the mousebutton click and make the the program jump to a certain label (or some other action you want to have.)
Code: Select all
screen catchMB(): key "mousedown_1" action Jump("nameOfLabel")
- Matalla
- Veteran
- Posts: 202
- Joined: Wed Mar 06, 2019 6:22 pm
- Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
- itch: matalla-interactive
- Location: Spain
- Contact:
Re: Can't get an ending screen to work
The easiest "click to continue" method is just a pause.
Code: Select all
"Final line of dialogue{w=3}{nw}" # Waits for 3 secons after finished displaying the message, then it closes automatically
scene black # Black screen
with fade # Probably you'll want to define a longer fade, the default is half a second
play music "your track.mp3" # You can experiment placing this before or after the next image, depending what effect you want
scene your_still_image
with fade
pause # It remains in pause until clicked
return # Or whatever you want to do after this
-
- Regular
- Posts: 36
- Joined: Fri Nov 23, 2018 6:44 pm
- Contact:
Re: Can't get an ending screen to work
You can put it anywhere you want, really. I usually keep my custom screens in a separate files, but there's no point in making one just for one screen. You could do it in the beginning of the script. To make it go to the main menu, you'd have to do thisrocket_shot wrote: ↑Mon May 13, 2019 6:40 pmwhere do i put that? under screens.rpy? if so, how would i apply it? and how do i make it return to the main menu on mouse click?Per K Grok wrote: ↑Mon May 13, 2019 6:03 pm You could make a screen that catches the mousebutton click and make the the program jump to a certain label (or some other action you want to have.)
Code: Select all
screen catchMB(): key "mousedown_1" action Jump("nameOfLabel")
Code: Select all
screen catchMB():
key "mousedown_1" action MainMenu()
Unless there's a specific reason you don't want to do that?
~There is almost always a better, easier way to approach a problem.~
- 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: Can't get an ending screen to work
To apply it you would need to have the code linerocket_shot wrote: ↑Mon May 13, 2019 6:40 pmwhere do i put that? under screens.rpy? if so, how would i apply it? and how do i make it return to the main menu on mouse click?Per K Grok wrote: ↑Mon May 13, 2019 6:03 pm You could make a screen that catches the mousebutton click and make the the program jump to a certain label (or some other action you want to have.)
Code: Select all
screen catchMB(): key "mousedown_1" action Jump("nameOfLabel")
show screen catchMB
but as others have commented
pause
return
is the simpler way to do it.
-
- Newbie
- Posts: 5
- Joined: Tue May 07, 2019 7:26 pm
- Contact:
Re: Can't get an ending screen to work
Thank you everybody. This works wonderfully. Last question on this topic, though. Is there a way that I could hide the quick menu at the bottom for this part only? If not, that's okay.
- Matalla
- Veteran
- Posts: 202
- Joined: Wed Mar 06, 2019 6:22 pm
- Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
- itch: matalla-interactive
- Location: Spain
- Contact:
Re: Can't get an ending screen to work
rocket_shot wrote: ↑Thu May 16, 2019 6:22 am Thank you everybody. This works wonderfully. Last question on this topic, though. Is there a way that I could hide the quick menu at the bottom for this part only? If not, that's okay.
Code: Select all
$ quick_menu = False
-
- Newbie
- Posts: 5
- Joined: Tue May 07, 2019 7:26 pm
- Contact:
Re: Can't get an ending screen to work
Thank you very muchMatalla wrote: ↑Thu May 16, 2019 6:46 amrocket_shot wrote: ↑Thu May 16, 2019 6:22 am Thank you everybody. This works wonderfully. Last question on this topic, though. Is there a way that I could hide the quick menu at the bottom for this part only? If not, that's okay.Code: Select all
$ quick_menu = False
Who is online
Users browsing this forum: Bing [Bot]