prevent skipping for credits?

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
User avatar
Mirrowdothack
Regular
Posts: 146
Joined: Tue Nov 05, 2013 7:37 am
Completed: The Iron Heart Witch
Projects: Y;N, Crime•Scene
Location: Germany
Contact:

prevent skipping for credits?

#1 Post by Mirrowdothack »

hi there^^
I'd like to know if there is a way to prevent the user from clicking.
I used "pause", "show screen" and "show text" etc to "animate" my credits ike a cutscene, but if the player wuld click a button he would skip the whole thing.
Is there a way to prevent it? Like telling renpy: do not accept a mouse/button-click until a certain point?

I hope you can help me out^^
My games:
Image Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: prevent skipping for credits?

#2 Post by xela »

More context please, disabling buttons is not the simplest thing to do in Ren'Py...

If you're using screen language for the credits (which would be a very smart thing to do), you could simply do something like:

screen credits:
modal True
zorder 100
timer (duration of credits) action Hide("credits")

And you're set. Or locking the screen and ui interact in a while loop might also work but would be more awkward. I am not 100% sure on how to disable narrator or say behavior on clicks of the top of my head if you're not using screens other than remapping keys.
Like what we're doing? Support us at:
Image

User avatar
Mirrowdothack
Regular
Posts: 146
Joined: Tue Nov 05, 2013 7:37 am
Completed: The Iron Heart Witch
Projects: Y;N, Crime•Scene
Location: Germany
Contact:

Re: prevent skipping for credits?

#3 Post by Mirrowdothack »

First thank you for you fast reply^^
I'm not really sure what you mean so I'm gonna show you how I did it so far:

label credits:
scene credti_bg

show credits01 with dissolve
pause 2.8
hide credits01
show credits02 with dissolve
pause 2.8

...

Do you think there is a way doing it like this?
My games:
Image Image

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: prevent skipping for credits?

#4 Post by Alex »


KimiYoriBaka
Miko-Class Veteran
Posts: 636
Joined: Thu May 14, 2009 8:15 pm
Projects: Castle of Arhannia
Contact:

Re: prevent skipping for credits?

#5 Post by KimiYoriBaka »

a quick suggestion:
if your game has any replay value or has multiple endings it's a good idea to only make the credits unskippable the first time the player goes through them. having to sit through them every time can be incredibly annoying

one way to do this is to use $ renpy.pause(pause_time, hard=persistent.seen_credits) for each pause and then set persistent.seen_credits to True at the end of the credits. this would most likely make it so the player has to click through each pause though (or just hit control or tab).

User avatar
Mirrowdothack
Regular
Posts: 146
Joined: Tue Nov 05, 2013 7:37 am
Completed: The Iron Heart Witch
Projects: Y;N, Crime•Scene
Location: Germany
Contact:

Re: prevent skipping for credits?

#6 Post by Mirrowdothack »

Thank you so much for your reply^^

I tried to use it like this:

Code: Select all

show credits1 with dissolve
$ renpy.pause(2.8, hard=True)
which works pretty well
I've included an overlay-button to skip (thank you for taht advise^^) like this:

Code: Select all

$ show_skipCredits = True
show credits1 with dissolve
$ renpy.pause(2.8, hard=True)
and:

Code: Select all

def skipCredits_overlay():
      if show_skipCredits:
          
          ui.textbutton("Skip Credits", style=style.button['inventoryButton'], clicked=ui.jumps("skipCredits"))
                
        config.overlay_functions.append(skipCredits_overlay)
it works, but sometimes the skipbutton seem to have a delay. I cant push it while an image uses dissolve to show up.
Do you think there might be a chance to change this?
My games:
Image Image

Post Reply

Who is online

Users browsing this forum: Ocelot