Can't get an ending screen to work

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
rocket_shot
Newbie
Posts: 5
Joined: Tue May 07, 2019 7:26 pm
Contact:

Can't get an ending screen to work

#1 Post by rocket_shot »

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.

User avatar
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

#2 Post by Per K Grok »

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.
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")

rocket_shot
Newbie
Posts: 5
Joined: Tue May 07, 2019 7:26 pm
Contact:

Re: Can't get an ending screen to work

#3 Post by rocket_shot »

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")
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?

User avatar
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

#4 Post by Matalla »

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
Comunidad Ren'Py en español (Discord)
Honest Critique

lacticacid
Regular
Posts: 36
Joined: Fri Nov 23, 2018 6:44 pm
Contact:

Re: Can't get an ending screen to work

#5 Post by lacticacid »

rocket_shot wrote: Mon May 13, 2019 6:40 pm
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")
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?
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 this

Code: Select all

screen catchMB():
    key "mousedown_1" action MainMenu()
...or just make a regular scene with a text displayable, and put "return" after the line, which will take the player to the main menu after they click.
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.~

User avatar
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

#6 Post by Per K Grok »

rocket_shot wrote: Mon May 13, 2019 6:40 pm
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")
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?
To apply it you would need to have the code line
show screen catchMB

but as others have commented

pause
return

is the simpler way to do it.

rocket_shot
Newbie
Posts: 5
Joined: Tue May 07, 2019 7:26 pm
Contact:

Re: Can't get an ending screen to work

#7 Post by rocket_shot »

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.

User avatar
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

#8 Post by Matalla »

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
Comunidad Ren'Py en español (Discord)
Honest Critique

rocket_shot
Newbie
Posts: 5
Joined: Tue May 07, 2019 7:26 pm
Contact:

Re: Can't get an ending screen to work

#9 Post by rocket_shot »

Matalla wrote: Thu May 16, 2019 6:46 am
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
Thank you very much :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot]