[SOLVED]I can't find the correct command to prevent the stop of a movie

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
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

[SOLVED]I can't find the correct command to prevent the stop of a movie

#1 Post by deltadidirac »

Hi, sorry about my stupid question, but is until yesterday that i can't find (here and on renpy site) the command to prevent to stop a movie from a player...

I usually use this function:

Code: Select all

label abc:
       scene alpha
       a " bla bla bla"
       $ renpy.movie_cutscene("my movie", loops = 0)
       jump defg
I would like that "my movie" will be played from start till the end without interruction from the player.

thanks
Last edited by deltadidirac on Sun Jan 20, 2019 1:23 pm, edited 1 time in total.

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

Re: I can't find the correct command to prevent the stop of a movie

#2 Post by rayminator »

try this it will not let you skip the video until you seen it if you did seen it it will allow you to ship

make sure that you delete persistent in renpy

put this above label start

Code: Select all

screen block_scr(flag, t):
        timer t action Hide("block_scr") repeat False
        if not flag:
            key "dismiss" action [[]]
put this after label start you will have adjust 123 = length of the video

Code: Select all

show screen block_scr(persistent.video_1_seen, 123)
    $ renpy.movie_cutscene("video/Yourvideo.webm")
    $ persistent.video_1_seen = True
hope this help you out

User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: I can't find the correct command to prevent the stop of a movie

#3 Post by deltadidirac »

thanks Rayminator,

if I understand well :

- first I copy and past your first code after the splashscreen and before the "start" label in the script file.
- second I don't understand if I must paste the second code only once after the "start" label, or anywhere there are a movie; and if I must change the "123" value for each movie (I think it mean "minutes"? or "seconds" ?)

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

Re: I can't find the correct command to prevent the stop of a movie

#4 Post by rayminator »

it would look like this

Code: Select all

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

label start:

show screen block_scr(persistent.video_1_seen, 123)
    $ renpy.movie_cutscene("video/Yourvideo.webm")
    $ persistent.video_1_seen = True
for this second part of the code it can go anywhere

for the 123 it's in sec of video

go here to convert to put minutes and seconds into one number
https://www.calculateme.com/time/seconds/to-minutes/

User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: I can't find the correct command to prevent the stop of a movie

#5 Post by deltadidirac »

Sorry Rayminator, I know that I'm dummy...

but I try to put your code in a different way (and also building a single label for each movie) but nothing gone right...

Premise that i just copy the first part of your code before the start label,
I put here one my 2 real labels that contains 3 different movies.. can you kindly re-write them correctly?

Code: Select all

label droom_04:
    if dagval ==8:
        
        play music "music/heaven.mp3" fadein = 1.5
    
        scene sc-droom3-06 with dissolve
        d "'Starting today my adventure ... heh,strange feeling...'"
        d "'I'm excited.... and nervous at the same time.'"
        d "'Let's see..'"
        
        
        scene sc-droom4-02 with dissolve
        d "'What did Dad always use to say about this sensation?'"
        d "'Ah yes... Now I remember...'"
        
        scene sc-droom4-03 with dissolve
        show dad-sx with dissolve
        d "({i}When you feel like that, and the tightness in your stomach becomes strong.)"
        d "({i}It's like when you're driving and you're facing a big curve,{b}Gravity{/b} moves you and you feel something in your body.)"
        d "({i}It just means that the direction is changing!)"
        hide dad-sx
        
        scene sc-droom4-02 with dissolve
        show dad-sx with dissolve
        d "({i}In life, that feeling is a warning, that your path is changing direction, and you can feel it in your mind.)"
        d "({i}So.. you have to be ready!... Because anything can happen!)"
        hide dad-sx
        
        scene sc-droom4-02a with dissolve
        d "'Oohh dad, how I miss you!'"
        
        scene sc-droom4-03a with dissolve
        d "'Hmm...I wonder if it is really possible to travel through time...'"
        d "'After all, the only theories that can describe the phenomenon in a coherent way, have to do with the possibilities surrounding theoretical physics, astrophysics and the black-holes'"
        d "'Which means, the immense energy required to pull it off would be impossible to attain, as well as being totally destructive...'"
        
        scene sc-droom4-02 with dissolve
        d "'Nah.... the solution must be found in another direction ...'" 
        d "{b}Gravity..{/b}Mhm...{i}Gravity...{i}Space-Time...{/i}"
        stop music fadeout 2.5
        d "'A black-hole... Mhm...'"
        
        
        
        scene bg black with dissolve

        $ renpy.movie_cutscene ("video/space-dag.webm", delay=None, loops=0)

        scene sc-droom4-01 
        play music "<from 60 to 200>music/heaven.mp3" fadein 2.0
        d "'Eh! Wait a minute!'"
        d "'Now that I remember, once Dr. Bloom told me that my dad was interested in some aspects concerning string theory, while the two of them were discussing their latest laser experiment.'"
        
        scene sc-droom4-03 with dissolve
        d "'Maybe dad had an intuition ... And now I have an idea why...Damn! I have to find the time to cover his last notes'"
        d "'They must still be all in his studio, next to mom's bedroom, Oh... it will really be one hell of a week.'"
        
        scene sc-droom3-06 with dissolve
        d "'Don't warry Dag... Everything will be done...'"
        
        scene sc-droom3-07 with dissolve
        d "'Mow that I remember ... Mom asked me to bring her the dirty clothes.'"
        
        scene sc-droom3-08 with dissolve
        d "'Better do that right away, otherwise I'll forget ...'"
        stop music fadeout 2.5

        $ dagval += 1
        $ droom1val += 1

        show screen droom1
        call screen interface         
      
    else:
        jump droom_05        
         
show screen droom1
call screen interface
        
###############################################        droom 05         
label droom_05:
    if dirtywear ==1 and dagval ==9 and hval ==1 and droom1val ==4:
        stop music
        scene sc-lound-00 with dissolve
        d "'Fine! Now I can go downstairs..'"
        
        play sound "audio/door.mp3"        
        scene sc-lound-01 with dissolve
        d "'Hmm.. The bath door is open, perhaps Lilly is done..'"
        
        scene sc-lound-02 with dissolve
        d "'Better take advantage of the opportunity, after I have brought the dirty clothes ...'"
        show camdag04
        d "'Living with three women is a fight to the death to win the bathroom...'"
        hide camdag04 with dissolve
        scene bg black
        $ renpy.movie_cutscene("video/lyl-walk.webm")
        
        scene sc-lound-03 with dissolve
        d "'.... Lilly is... Jesus! What a body...'"
        d "'It's real that we are brother and sisters.'"
        
        scene sc-lound-04 with dissolve
        d "'But.. sometimes.. it's like being invisible.'"
        d "'Better not think about it..'"
        
        scene sc-lound-05 with dissolve
        d "'Mhm... I feel like an obscure presence approaching me...'"
        
        scene sc-lound-06 with dissolve
        d "'Oh shit! ... Caught!'"
        scene bg black
        $ renpy.movie_cutscene("video/psycho.webm")
        
        scene sc-lound-07 #with dissolve
        d "'Damn!... I'm gonna die now...'"
        
        scene sc-lound-08 with dissolve
        show camkaty06
        k "'...{b} You!!!...'"
        d "'........'"
        hide camkaty06
        
        scene sc-lound-09 with dissolve
        k "'You should be ashamed....'"
        d "'..but...'"
        
        scene sc-lound-10 with vpunch
        play sound "audio/slap.mp3"
        "{b}{space=270} SBAMM!...."
        k "'Pervy Pig!...'"
        
        scene sc-lound-11 with dissolve
        k "'PIG!... PIG!... PIG!...'"
        d "'Oh God...'"
        
        scene sc-lound-12 with dissolve
        play sound "audio/sbuff-rass-man.mp3"
        d "'Fuuu.... luckily the fury left...'"
        d "'Well let's go downstairs before running into her again...'"
        
        $ dagval +=1
        $ droom1val +=1
        $ lval +=1
        $ kval +=1
        #jump end_page
        

        show screen dhallawayup
        call screen interface
        
    else:
       
        show screen droom1
        call screen interface
        
show screen droom1
call screen interface[code]

Be an artist and not a programmer It's real a big wall...
(sorry)

see you

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

Re: I can't find the correct command to prevent the stop of a movie

#6 Post by rayminator »

it should work just make sure you delete persistent in renpy not the file itself open renpy there should be something listed saying delete persistent if you already seen the video at least once it will allow you to skip if haven't it will not allow you to skip

Code: Select all

show screen block_scr(persistent.video_1_seen, 123)
$ renpy.movie_cutscene ("video/space-dag.webm", delay=None, loops=0)
$ persistent.video_1_seen = True

User avatar
deltadidirac
Regular
Posts: 123
Joined: Fri Nov 30, 2018 5:00 am
Projects: Artworks and Comics
Tumblr: deltadidirac
Deviantart: Deltadidirac67
Location: Europe
Contact:

Re: I can't find the correct command to prevent the stop of a movie

#7 Post by deltadidirac »

Rayminator, thanks for the help,

But I find now this code that for me it's more simple to manage:

Code: Select all

play movie "Ok.webm"
$ renpy.pause(2, hard=True)
pause 25
stop movie[code]

the second pause number indicate the length of the movie
Anyway thanks again for all

Post Reply

Who is online

Users browsing this forum: Google [Bot]