No skip function for playing movies

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
initialzero
Regular
Posts: 27
Joined: Fri Jul 08, 2016 6:53 am
Contact:

No skip function for playing movies

#1 Post by initialzero »

Is there any statement how to "not skipping" the movie scene for the first time playing? After second play they can skip it like the dialogues.

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: No skip function for playing movies

#2 Post by hell_oh_world »

initialzero wrote: Fri Oct 11, 2019 2:10 pm Is there any statement how to "not skipping" the movie scene for the first time playing? After second play they can skip it like the dialogues.
What you can do is to create a variable that will keep track of the already watched movies, then use condition and hard pause with the duration being the same as of the movie.
Maybe something like this...

Code: Select all

default watched_movies = []
default movie = ""

label start:
	$ movie = "Movie.webm"
	$ renpy.movie_cutscene(movie) ## For ex the movie lasts for 5 seconds, use this duration for the pause.
	if movie not in watched_movies:
		$ renpy.pause(5.0, hard=True)
		$ watched_movies.append(movie)

Post Reply

Who is online

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