File: tutorial_video.rpy

package info (click to toggle)
renpy 6.10.2.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,468 kB
  • ctags: 5,383
  • sloc: python: 17,801; ansic: 7,116; makefile: 127; sh: 15
file content (53 lines) | stat: -rw-r--r-- 1,681 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This file contains demonstrations of Ren'Py's multimedia
# support. Right now, this is just showing off sound and music, but
# Ren'Py does support movies, and we'll add them sometime later.

#begin movie_image
image movie = Movie(size=(320, 240), xpos=475, ypos=50, xanchor=0, yanchor=0)
#end movie_image

label tutorial_video:

    e "Ren'Py supports playing movies. There are two ways of doing this."

    e "The first way allows you to show a movie as an image, along with every other image that's displayed on the screen."
    
    show example movie_image
    
    e "To do this, we first have to define an image to be a Movie displayable. Movie displayables require a size argument, and also use properties to position themselves on the screen."

    stop music fadeout .25
    show example movie_play
    pause .25
    
    #begin movie_play
    show movie behind eileen
    play movie "shuttle.ogv"
    #end movie_play
    
    e "Then, we can show the movie displayable, and start the movie playing with a play statement."

    #begin movie_stop
    stop movie
    hide movie
    #end movie_stop

    show example movie_stop
    
    e "When we no longer want to play the movie, we can stop it, and then hide it."

    show example movie_cutscene 
    
    e "The other way to show a movie is with the renpy.movie_cutscene python function. This shows the movie fullscreen, either until it ends or until the user clicks."

    hide example
        
    #begin movie_cutscene
    $ renpy.movie_cutscene("shuttle.ogv")
    #end movie_cutscene
    
    e "And that's all there is when it comes to movie playback in Ren'Py."

    play music "happy_alley.ogg"
    
    return