Playing a movie in renpy

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
Anybody know how to play a movie in Ren'py?

So lets say I have a background image that has a TV screen. How would I play, size, and position the movie clip over that screen?

Thanks,
Chatterbox
 

Epadder

Programmer
Game Developer
Oct 25, 2016
568
1,064
So the best way to do this if you have a single background image would be to make a composite as an example:
Python:
image tvscreen = Composite(
    (1920,1080),
    (0,0), "ci_Aura_bg.webp",
    (450,450), Movie(play="mm.webm", size=(640, 360))
    )
The first value is the size the composite image (In this case the size of the background)
The next value is the x,y anchor from the top left corner of the composite and the name of the image displayable on the bottom of the composite,
the next value is the x,y anchor from the top left corner of the composite and the code to define a movie with the filename and x,y size of the movie.

If your in a label you would use:
Code:
label somelabel:
    "blah"
    "blah"
    show tvscreen
    "blah"
    "blah"
On a screen you would use:
Code:
screen myScreen():
    ### OTHER CODE
    add "tvscreen"
    ### OTHER CODE
 

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
Awesome! Thank you so much! I've been racking my brain trying to figure this one out.