Image Flip and Live Composite?

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
cattro
Newbie
Posts: 16
Joined: Thu Nov 14, 2013 3:56 am
Contact:

Image Flip and Live Composite?

#1 Post by cattro » Tue Jun 24, 2014 1:34 pm

So I found
image eileen flip = im.Flip("eileen_happy.png", vertical=True)
Which is awesome so I won't have to save my images twice, but how do I flip an image that's live composite?
If I use
image jenny flip = im.Flip(Jenny, horizontal=True) or with "Jenny"
it says it cannot find it?

User avatar
chirinworks
Newbie
Posts: 8
Joined: Wed Apr 09, 2014 10:44 am
Projects: Saturn's Trip to the Sun
Organization: Chirin Works
Contact:

Re: Image Flip and Live Composite?

#2 Post by chirinworks » Tue Jun 24, 2014 2:15 pm

You need to use im.Flip for every separate part of your Live Composite.

Something copy-pasted from one of my own projects:

Code: Select all

def draw_roco(st, at): #Normal Version
        return LiveComposite(
            (245, 700),
            (0, 0), "s/r_body.png",
            (0, 0), "s/r_outfit.png",
            (0, 0), "s/r_face.png",
            ),.1
        
    def draw_roco_flip(st, at): #Flipped Version
        return LiveComposite(
            (245, 700),
            (0, 0), im.Flip("s/r_body.png", horizontal=True),
            (0, 0), im.Flip("s/r_outfit.png", horizontal=True),
            (0, 0), im.Flip("s/r_face.png", horizontal=True),
            ),.1

User avatar
Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Image Flip and Live Composite?

#3 Post by Asceai » Tue Jun 24, 2014 8:00 pm

One trick is to do the flip live; that is, through a transform

Try:
image jenny flip = Transform(Jenny, xzoom=-1.0)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot