question about mpeg1

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
User avatar
Sakurazaki
Veteran
Posts: 378
Joined: Mon Sep 03, 2007 1:37 pm
Projects: Aquae ~CCW~, Consonance
Contact:

question about mpeg1

#1 Post by Sakurazaki » Thu Jun 05, 2008 12:43 am

Let's say that I want to use a mpeg1 video file for my intro right before the menu appears, how would I go about doing that?

I'd have to use $ renpy.movie_cutscene("opening.mpg") right? but where should I put it? I also want it to skip over it when the user clicks or something.
ARC I - Summer Lights: Image
ARC II - Ocean Tide: Image

User avatar
denzil
Veteran
Posts: 293
Joined: Wed Apr 20, 2005 4:01 pm
Contact:

Re: question about mpeg1

#2 Post by denzil » Thu Jun 05, 2008 3:54 am

Details are on the wiki, the code should be something like this:

Code: Select all

label splashscreen:
    $ renpy.movie_cutscene("opening.mpg")
    return
Practice makes purrrfect.
Finished projects: Broken sky .:. colorless day .:. and few more...

User avatar
Sakurazaki
Veteran
Posts: 378
Joined: Mon Sep 03, 2007 1:37 pm
Projects: Aquae ~CCW~, Consonance
Contact:

Re: question about mpeg1

#3 Post by Sakurazaki » Fri Jun 06, 2008 12:54 am

:o I shall try that out.
ARC I - Summer Lights: Image
ARC II - Ocean Tide: Image

User avatar
AngelicCarrot
Regular
Posts: 152
Joined: Sun Jun 01, 2008 6:12 pm
Contact:

Re: question about mpeg1

#4 Post by AngelicCarrot » Mon Jun 09, 2008 7:18 pm

I have a question like this too, I'm just confused if we had the same problem ^^;

If I use that code, can I put it in so it comes on BEFORE the title screen? Or if I can't do that, will the video always play before starting the game even when you're starting from a saved place? :O
Life, Liberty and RAINBOWS OF HAPPINESS

http://angelicalchemey.deviantart.com/

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: question about mpeg1

#5 Post by EvilDragon » Tue Jun 10, 2008 3:02 am

If you inserted the video with the above code, it will always play before the game starts. If you want to play the video only once, you can make an inquiry if the main label (start) has been viewed (that is, the video will show only if the user hasn't started the game itself):

Code: Select all

label splashscreen:
     if not renpy.seen_label("start"):
         $ renpy.movie_cutscene("opening.mpg")
         return
I think you misunderstood something here. When you put something in "label splashscreen", that is only shown only when opening the game, and not when restarting from within game back to main menu. So, when loading a saved game, splashscreen will not show up.
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
AngelicCarrot
Regular
Posts: 152
Joined: Sun Jun 01, 2008 6:12 pm
Contact:

Re: question about mpeg1

#6 Post by AngelicCarrot » Tue Jun 10, 2008 8:58 pm

Oh, okay! Thankyou :3
Life, Liberty and RAINBOWS OF HAPPINESS

http://angelicalchemey.deviantart.com/

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Luxee