[Solved]how to make a video unclickable

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
rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

[Solved]how to make a video unclickable

#1 Post by rayminator »

how to make unclickable video show the play can't stop the video if it wasn't seen in the first route but the other route are clickable

Code: Select all

$ renpy.movie_cutscene("video/how to make this unclickable.webm")
Last edited by rayminator on Sat Mar 03, 2018 12:49 pm, edited 1 time in total.

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

Re: how to make a video unclickable

#2 Post by Alex »

You can try

Code: Select all

screen block_scr(flag, t):
    timer t action Hide("block_scr") repeat False
    if not flag:
        key "dismiss" action [[]]
        
# The game starts here.
label start:
    "..."
    show screen block_scr(persistent.video_1_seen, 5)
    "incert video here{w=5}{nw}"
    $ persistent.video_1_seen = True
    "Try to play once again..."
    "?"
https://www.renpy.org/doc/html/screens.html#key
https://www.renpy.org/doc/html/screens.html#timer
https://www.renpy.org/doc/html/screen_actions.html

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

Re: how to make a video unclickable

#3 Post by rayminator »

thank for the help but it didn't work it only show it in the textbox of the name of the video

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

Re: how to make a video unclickable

#4 Post by Alex »

You need to show your video instead of this textline. The trick is to show block_scr screen with unique persistent variable for each video before video starts.

Code: Select all

    show screen block_scr(persistent.video_1_seen, 5) # change 5 to the actual duration of your video in seconds
    $ renpy.movie_cutscene("video/how to make this unclickable.webm")
    $ persistent.video_1_seen = True

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

Re: how to make a video unclickable

#5 Post by rayminator »

thanks that works now

Post Reply

Who is online

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