HELP:HIDE A MOVIE ON RENPY

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
anambread_xx
Newbie
Posts: 9
Joined: Tue Jul 30, 2019 7:48 pm
Contact:

HELP:HIDE A MOVIE ON RENPY

#1 Post by anambread_xx »

so I followed a tutorial on how to display the movie, but it would leave. it just keeps playing whilst my script in the background keeps going. how do i play it and when it finishes it leaves.

Code: Select all

# movie 
 image movie = Movie(size=(1280, 720), xpos=100, ypos=100, xanchor=100, yanchor=100)
play movie "day_2.ogv"

k "you have 28 days left"

hide movie with fade
that is my line of code for the movie if anyone can help that would be great because I searched everywhere, and it's just too complicated for me to understand :cry:

User avatar
Enchant00
Regular
Posts: 136
Joined: Tue Jan 12, 2016 1:17 am
Contact:

Re: HELP:HIDE A MOVIE ON RENPY

#2 Post by Enchant00 »

Just set loop to false.

Code: Select all

 image movie = Movie(size=(1280, 720), xpos=100, ypos=100, xanchor=100, yanchor=100, loop = False)

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: HELP:HIDE A MOVIE ON RENPY

#3 Post by rames44 »

Another thing to look at - you started the movie with "play", but then tried to hide it with "hide". "Play" and "hide" don't really go together as a pair.

An alternate approach is to give a full definition of the movie "image" including the file name, at which point you can just "show" and "hide" the movie.

Code: Select all

image movie_day_2 = Movie(play="day_2.ogv", size=(1280, 720), xpos=100, ypos=100, xanchor=100, yanchor=100)

...

show movie_day_2

...

hide movie_day_2
Basically, if you create a complete definition of a Movie as an image, you can then do anything with it that you could do with any other image. So you could also do

Code: Select all

scene movie_day_2

dialog, dialog, dialog

scene some_other_image # movie_day_2 image will automatically be removed

Post Reply

Who is online

Users browsing this forum: Google [Bot]