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.
-
Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
-
Contact:
#1
Post
by Shocking Alberto » Thu Jul 23, 2020 9:39 pm
I'm not entirely sure how I never noticed this as I've been working with video in Ren'py for a while now but I notice that not only do video files not loop but it gets skipped completely unless I put in a pause.
Code: Select all
image A01 = Movie(play="video/A01.webm", size=(800,600), channel='movies', xpos = 0, ypos = 0, xanchor = 0, yanchor = 0, loop = True)
label start:
show screen custom_menu
$ quick_menu = False
show A01
jump prologue
With just this simple code, the game flies through the start label and goes directly to prologue. Unless I put in a $ renpy.pause(10.0), the video won't play more than a split second. Of course, I can't get it to loop either since it just jumps to the next label when 10 seconds have elapsed.
I'm not entirely sure what I'm missing here but I will do my usual and trawl for clues. If there's a thread already addressing this, do point me in that direction and I'll figure things out.
Last edited by
Shocking Alberto on Fri Jul 24, 2020 9:21 pm, edited 1 time in total.
-
Andredron
- Miko-Class Veteran
- Posts: 535
- Joined: Thu Dec 28, 2017 2:37 pm
- Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
- Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
- Location: Russia
-
Contact:
#2
Post
by Andredron » Fri Jul 24, 2020 12:08 pm
I did so
resurse.rpy
Code: Select all
init python hide:
import os
os.environ['SDL_VIDEO_CENTERED'] = '1'
init:
image movie = Movie(size=(config.screen_width, config.screen_height))
init python:
config.automatic_images_minimum_components = 1
config.automatic_images = [' ', '_', '/']
config.automatic_images_strip = ["images"]
script.rpy
Code: Select all
label start:
voice "voice/2054.ogg"
ta "しかも、なかなかの触り心地だ"
au "若干の硬さを保ちつつも、オレの手の動きにあわせて形を変える肉の双丘。\n時には広げるように......。\n時には狭め......人差し指と中指で敏感な先端を軽く挟む。"
au "ふふふ......。反応しないように我慢しているのか。"
scene white with flashbulb
pause 1.0
play amby "music/les.mp3"
show movie with dissolve
$ renpy.music.play("les.webm", channel="movie", loop= True)#for the background to loop, put it loop =True
pause 8.0
scene les_end with dissolve
pause 0.00001
show movie with dissolve
$ renpy.music.play("c_les.webm", channel="movie", loop=False)
au "今は授業中だ。こんな高台の、しかも校舎裏の丘になんか誰も来る訳がない。\nここにはオレ達しかいないんだよ。"
-
Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
-
Contact:
#3
Post
by Shocking Alberto » Fri Jul 24, 2020 9:21 pm
Okay, I'm just dumb and didn't realize that since there's no code, text displayed or anything after the video that of course it would get skipped and go straight to the next label... Sorry, I should know better.