Looping a movie until user stops it.

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
Darksoul1978
Newbie
Posts: 5
Joined: Fri Mar 13, 2020 5:58 am
Contact:

Looping a movie until user stops it.

#1 Post by Darksoul1978 » Wed Apr 22, 2020 10:11 am

ok in my game I want a movie to display and loop until it is stopped. this is my current code: $ renpy.movie_cutscene("images/707.ogg")
that plays the movie till it stops and then it reverts to the previous scene. I want the movie to loop until it is stopped and not revert to the previous image.
I tried this code from the ren'py help site and it breaks the game giving a syntax error: renpy.movie_cutscene(filename, delay=None, loops=0, stop_music=True)

Please help.

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

Re: Looping a movie until user stops it.

#2 Post by rames44 » Wed Apr 22, 2020 12:23 pm

Instead of using cutscene, define an image as a Movie object, and show it the way you would any other image. Movie objects loop by default.

https://www.renpy.org/doc/html/movie.ht ... ie-sprites

GoldBrows
Newbie
Posts: 12
Joined: Tue Mar 27, 2018 6:22 pm
Contact:

Re: Looping a movie until user stops it.

#3 Post by GoldBrows » Wed Apr 22, 2020 12:38 pm

Without getting too complicated, this is what I do to have a movie loop in the background. In particular I use this to show a video of clouds in the sky floating across the screen while characters talk. If you wanted to get more complicated you could create a screen instead and layer things on top of the movie, but for now this will easily do what you want

Code: Select all

image my_movie = Movie(play="video/my_moview.webm")

scene my_movie

"Now the movie is looping in the background"


Post Reply

Who is online

Users browsing this forum: No registered users