Panning Across A 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
lindsay-jb
Regular
Posts: 68
Joined: Tue Aug 25, 2020 1:05 am
Contact:

Panning Across A Background

#1 Post by lindsay-jb »

I was wondering if it's possible to pan across a background without changing the image in the "scene" statement? For example, I have a very wide background that that whole screen doesn't show. Sometimes, I want to pan from one part of the bg to another part. For example, if I have an apartment bg and the characters are in the sitting room and move to the kitchen, that's all part of one background and I want to be able to pan from the left side of the bg with the sitting room to the right side with the kitchen. How would one do that? With the transformation language, I can only find transitions for completely changing from one background to another, not just transitioning to show a different section of the background.

Thank you!

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Panning Across A Background

#2 Post by Alex »

Check the Tutorial game that ships with the engine - it has example with concert.

lindsay-jb
Regular
Posts: 68
Joined: Tue Aug 25, 2020 1:05 am
Contact:

Re: Panning Across A Background

#3 Post by lindsay-jb »

I ended up using this code to define a transform to do it:

Code: Select all

transform left_to_right:
    xalign 0.0
    linear 2.0 xalign 1.0
Then I can say

Code: Select all

scene cafe at left_to_right
and it'll pan from left to right.

Post Reply

Who is online

Users browsing this forum: Alex, Google [Bot]