Help panning a scene background

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
wayward
Regular
Posts: 41
Joined: Tue Jun 30, 2015 9:53 pm
Contact:

Help panning a scene background

#1 Post by wayward » Wed Aug 05, 2015 9:31 pm

Maybe someone here can explain this. Pretty much what I'm trying to do is make a scene appear, show the image background appear for a few seconds and then pan down to the bottom of the background. my background height is double my resolution size.

It works and it doesn't. Here's what I've got.

Code: Select all

label start:
    scene background with fade:
        pause 3.0   
        yalign 0.0
        linear 10.0 yalign 1.0
   
    scene next_background
With ^these^ lines my image shows for about a half a second and then switches to the next scene. If I remove the pause line the scene pans down really fast and then switches to the next scene. Now...

Code: Select all

label start:
    scene background with fade:
        pause 3.0   
        yalign 0.0
        linear 10.0 yalign 1.0
    name "test"

    scene next_background
If I add a bit of dialogue (did this to just see what happens if the game was forced to wait for user input), everything works like I want it to. background shows for 3 seconds and then does a 10 second pan perfectly. Could anyone enlighten me as to what's happening? Any way to do this without the dialogue "stopper"?

User avatar
Alera
Miko-Class Veteran
Posts: 651
Joined: Sun Mar 21, 2010 3:20 am
Completed: Tortichki // Zayay // Hero's Spirit
Deviantart: psyalera
itch: psyalera
Location: UK
Contact:

Re: Help panning a scene background

#2 Post by Alera » Thu Aug 06, 2015 4:10 am

How about having a second pause, outside of your scene block, in place of the dialogue? Is this the effect you wanted?

Code: Select all

label start:
    scene background with fade:
        pause 3.0   
        yalign 0.0
        linear 10.0 yalign 1.0
    pause 10.0

    scene next_background
Image
Games:
❤️ Zayay [Otome?][BxPlayer][NaNo 2013]
❤️ Tortichki [Drag&Drop mini game]

Other games I've worked on:
My Heart's Flame Emissary of Starlight Freedom From Silence Sickness
And many more unannounced/secret projects. (. .)

wayward
Regular
Posts: 41
Joined: Tue Jun 30, 2015 9:53 pm
Contact:

Re: Help panning a scene background

#3 Post by wayward » Thu Aug 06, 2015 3:28 pm

Alera wrote:How about having a second pause, outside of your scene block, in place of the dialogue? Is this the effect you wanted?
Wow, why does that work? I'm trying to make sense of it in my head. Thanks.

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Help panning a scene background

#4 Post by mobychan » Fri Aug 07, 2015 1:56 am

The linear transition doesn't block the following actions, so if the following action actually waits on the last one to finish you have the effect you wanted^^

wayward
Regular
Posts: 41
Joined: Tue Jun 30, 2015 9:53 pm
Contact:

Re: Help panning a scene background

#5 Post by wayward » Fri Aug 07, 2015 12:19 pm

mobychan wrote:The linear transition doesn't block the following actions, so if the following action actually waits on the last one to finish you have the effect you wanted^^
Oh, okay. That makes sense.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]