[Solved]Panning from right to left.

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
Noire
Regular
Posts: 108
Joined: Sun Mar 10, 2013 3:06 am
Projects: Mirage Noir
Contact:

[Solved]Panning from right to left.

#1 Post by Noire » Mon Feb 16, 2015 10:25 pm

Last time I used panning function it was when the

Code: Select all

scene marspan at Pan((0, 0), (1600, 0), 10.0)
was still in action.

I've searched the forums and I found neat tutorials how to do the panning with ATL functions, but they did not help me.
My problem is very simple, yet I didn't found an answer how to pan a horizontal image from right to left :( (all tutorials are for left->right movement).

I tried to change values, but it moves from top to bottom, from center to right etc.
I didn't find a clean right->left movement. Sorry for my silly question.
Last edited by Noire on Tue Feb 17, 2015 8:29 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Panning from right to left.

#2 Post by PyTom » Tue Feb 17, 2015 12:03 am

A reasonable way to do a pan is to crop the image.

Code: Select all

scene marspan:
     crop (0, 0, 800, 600)
     linear 10.0 crop (1600, 0, 800, 600)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Noire
Regular
Posts: 108
Joined: Sun Mar 10, 2013 3:06 am
Projects: Mirage Noir
Contact:

Re: Panning from right to left.

#3 Post by Noire » Tue Feb 17, 2015 12:34 am

Well, I typed my desired parameters (Forgot to mention it earlier, my screen is 1024x768, while the picture for panning is 1536x768)

Code: Select all

scene bg tavernoutsidenight_full with dissolve:
        crop (0, 0, 1034, 768)
        linear 3.0 crop (1536, 0, 1024, 768)
The result was that the image panned out completely from the screen (leaving checkered, transparent background), while still sliding in the left->right direction.
Again, I tried changing various parameters. I managed to get it slide up, down, left ->right in various strange combination. Never right->left, I have no idea why is this happening. I'm probably missing something very simple, since I'm very sleepy right now :(

User avatar
xavimat
Eileen-Class Veteran
Posts: 1458
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Panning from right to left.

#4 Post by xavimat » Tue Feb 17, 2015 7:47 am

This doesn't work?:

Code: Select all

scene maspan:
    xalign 1.0
    linear 10 xalign 0.0
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Noire
Regular
Posts: 108
Joined: Sun Mar 10, 2013 3:06 am
Projects: Mirage Noir
Contact:

Re: Panning from right to left.

#5 Post by Noire » Tue Feb 17, 2015 8:29 am

Yes!
It worked!

Oh gods, it was this simple ;_;

Thank you so much :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], proller