Make game temporarily unskippable

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
CyDementia
Regular
Posts: 28
Joined: Wed Mar 14, 2018 5:54 pm
Contact:

Make game temporarily unskippable

#1 Post by CyDementia »

Sorry for asking this question since it most certainly was resolved many times already. I have the following moments in my script.rpy :

Code: Select all

scene bg_intro with Dissolve(3.5)    
pause 1.0
scene bg_black with Dissolve(3.5)

"text text text."
and:

Code: Select all

$ renpy.movie_cutscene("opening.avi")
I want to make some of the dissolving scenes such as above to be unskippable and add confirmation window if player trying to skip the video.
$ renpy.pause won't help with this problem (it breaks dissolving if user clicks).

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Make game temporarily unskippable

#2 Post by rayminator »

you can make the video unskippable by doing this and adjust 123 they are in seconds

Code: Select all

show screen block_scr(persistent.video_1_seen, 123)
    $ renpy.movie_cutscene("video/WankotoKurasou.webm")
    $ persistent.video_1_seen = True
but to make it as confirm to skip that i have no clue how to that

search google for a converter for minutes to sec that will help to get the number you need say if your video is 3 minute long it will be 180 seconds

CyDementia
Regular
Posts: 28
Joined: Wed Mar 14, 2018 5:54 pm
Contact:

Re: Make game temporarily unskippable

#3 Post by CyDementia »

rayminator wrote: Sun Mar 18, 2018 10:19 pm you can make the video unskippable by doing this and adjust 123 they are in seconds

Code: Select all

show screen block_scr(persistent.video_1_seen, 123)
    $ renpy.movie_cutscene("video/WankotoKurasou.webm")
    $ persistent.video_1_seen = True
but to make it as confirm to skip that i have no clue how to that

search google for a converter for minutes to sec that will help to get the number you need say if your video is 3 minute long it will be 180 seconds
Oh, I've already seen your exactly same answer for similar question. Using it I receive error: Screen block_scr is not known. How do I make it known and in which part of the script? (options or screens etc).
Anyway I'm more interested exactly in transitions so question remains opened. I had following thought: is there any way of making transparent unclickable screen on top of all other screens which remains for certain time?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Make game temporarily unskippable

#4 Post by rayminator »

i forgot this put in just after label start

Code: Select all

screen block_scr(flag, t):
        timer t action Hide("block_scr") repeat False
        if not flag:
            key "dismiss" action [[]]

CyDementia
Regular
Posts: 28
Joined: Wed Mar 14, 2018 5:54 pm
Contact:

Re: Make game temporarily unskippable

#5 Post by CyDementia »

rayminator wrote: Sun Mar 18, 2018 11:02 pm i forgot this put in just after label start

Code: Select all

screen block_scr(flag, t):
        timer t action Hide("block_scr") repeat False
        if not flag:
            key "dismiss" action [[]]
Albeit it is not a solution with confirmation window, it works, thank you. Is it possible to adjust this code for transitions too? And there is a problem that when you use skip function video skips (let it be) but when you stop skipping somewhere afterwards, dismiss action still locked because timer is still turned on. And this solution is only for the 1st time playing. I tried to adjust 1 to 50 but video still skips. I also cleared persistent data and it didn't help.

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Make game temporarily unskippable

#6 Post by rayminator »

if you haven't played after the movie has been done it won't skip because you haven't seen the video or text even if you started a new game it won't skip unless you have seen it not in less you tell it to by going into preference and select skip unseen text but if you have played past the video and text it will be skip it will stop skipping to the text that hasn't been seen this is as far as i can get you i'm in the learning stage as well

CyDementia
Regular
Posts: 28
Joined: Wed Mar 14, 2018 5:54 pm
Contact:

Re: Make game temporarily unskippable

#7 Post by CyDementia »

rayminator wrote: Sun Mar 18, 2018 11:47 pm if you haven't played after the movie has been done it won't skip because you haven't seen the video or text even if you started a new game it won't skip unless you have seen it not in less you tell it to by going into preference and select skip unseen text but if you have played past the video and text it will be skip it will stop skipping to the text that hasn't been seen this is as far as i can get you i'm in the learning stage as well
Ok, I got you, thx. What about adjusting this code for transitions? Is it possible somehow?

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Make game temporarily unskippable

#8 Post by rayminator »


CyDementia
Regular
Posts: 28
Joined: Wed Mar 14, 2018 5:54 pm
Contact:

Re: Make game temporarily unskippable

#9 Post by CyDementia »

Okay, thank you

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], ZianRiyone