Prevent player skipping video

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
clannadman

Prevent player skipping video

#1 Post by clannadman »

Is there anyway to prevent a player from clicking and skipping a video when used or a splashscreen? Mainly the video I want to know about.

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

Re: Prevent player skipping video

#2 Post by Alex »

Just add

Code: Select all

$ renpy.pause(10, hard=True)
line right after the video (hard=True - will make pause unskipable)

clannadman

Re: Prevent player skipping video

#3 Post by clannadman »

and will the length of pause not matter, or does it have to match the length of the video?

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

Re: Prevent player skipping video

#4 Post by Alex »

Of course yes. If pause will be less than video length, then player could skip video after pause end.

clannadman

Re: Prevent player skipping video

#5 Post by clannadman »

okay then, thankyou :)

clannadman

Re: Prevent player skipping video

#6 Post by clannadman »

I've hit another problem. It seems as though the player can't skip the pause, however if they click once, the video stops and they're forced to sit and wait for however many seconds are left looking at a black screen. Any ideas?

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

Re: Prevent player skipping video

#7 Post by Alex »

Ooops... that's because I've never did it myself. And at first sight it seemed so easy to do...

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Prevent player skipping video

#8 Post by PyTom »

Doing something like:

Code: Select all

play movie "user_hate.ogv"
$ renpy.pause(15.0, hard=True)
might work.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

clannadman

Re: Prevent player skipping video

#9 Post by clannadman »

PyTom wrote:Doing something like:

Code: Select all

play movie "user_hate.ogv"
$ renpy.pause(15.0, hard=True)
might work.
Thanks, that's done it. Another query though. The player can still go to the in game menu which pauses the video so that when they return it's a black screen of nothingness. Is there any way to prevent the user from accessing the game menu during a video?


clannadman

Re: Prevent player skipping video

#11 Post by clannadman »

Thankyou for all the help guys. Sorry for being such a novice :)

User avatar
Gear
Miko-Class Veteran
Posts: 764
Joined: Tue Apr 05, 2011 10:15 pm
Projects: Tempestus Sum
Organization: Xenokos Interactive
IRC Nick: Gear
Skype: Skye.Gear
Location: Grand Prairie, TX
Contact:

Re: Prevent player skipping video

#12 Post by Gear »

Thank you for asking all those questions! Now I don't have to make a topic myself, haha!
The best reason to get up in the morning is to outdo yourself: to do it better than you've ever done it before. But if you haven't done it better by nightfall... look at your globe and pick a spot: it's always morning somewhere.

oldhiccup
Newbie
Posts: 14
Joined: Thu Jan 28, 2021 8:27 pm
Contact:

Re: Prevent player skipping video

#13 Post by oldhiccup »

Thanks :)

User avatar
zmook
Veteran
Posts: 421
Joined: Wed Aug 26, 2020 6:44 pm
Contact:

Re: Prevent player skipping video

#14 Post by zmook »

clannadman wrote: Mon Apr 04, 2011 11:20 am
PyTom wrote:

Code: Select all

play movie "user_hate.ogv"
$ renpy.pause(15.0, hard=True)
Thanks, that's done it.
How is that different from what you were doing before (that didn't work and gave a black screen)?
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM

Post Reply

Who is online

Users browsing this forum: Lohre