Flipping an ATL anchor point [Solved for now]

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
Graph
Veteran
Posts: 230
Joined: Sat Jul 03, 2010 7:22 pm
Completed: Touhou Mecha Chap. 1
Projects: Touhou Mecha, Eastern Starlight Romance
Organization: Dai-Sukima Dan
Contact:

Flipping an ATL anchor point [Solved for now]

#1 Post by Graph » Wed Oct 16, 2013 5:35 pm

What's a simple transform statement I can use to horizontally flip an anchor point? For example, changing

Code: Select all

anchor(30/76.0, 44/105.0)
to this

Code: Select all

anchor(46/76.0, 44/105.0)
I already use

Code: Select all

xzoom -1
to horizontally flip images, so I was wondering if there's a way to do this with anchors.
Last edited by Graph on Thu Oct 17, 2013 7:13 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 15426
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: Flipping an ATL anchor point

#2 Post by PyTom » Wed Oct 16, 2013 8:33 pm

I think transform_anchor True might work.
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
Graph
Veteran
Posts: 230
Joined: Sat Jul 03, 2010 7:22 pm
Completed: Touhou Mecha Chap. 1
Projects: Touhou Mecha, Eastern Starlight Romance
Organization: Dai-Sukima Dan
Contact:

Re: Flipping an ATL anchor point

#3 Post by Graph » Wed Oct 16, 2013 10:34 pm

Ah, I actually did hear about transform_anchor before. It might do the trick, but I should explain a bit more about how I'm using this.

I have an anchor point attached to each sprite

Code: Select all

image doll:
        "doll.png"
        anchor(30/76.0, 44/105.0)
And I haven't found any examples of how to use transform_anchor when the anchor is defined with the image. I tried using syntax like in the last post of this topic, but when I try to display an image defined like this

Code: Select all

image doll:
        "doll.png"
        transform_anchor(30/76.0, 44/105.0) anchor(30/76.0, 44/105.0) rotate_pad True
I get the error shown in the attached traceback. Same thing when I define it like this:

Code: Select all

image doll:
        "doll.png"
        transform_anchor True anchor(30/76.0, 44/105.0)
Attachments
traceback.txt
(1.88 KiB) Downloaded 54 times

User avatar
PyTom
Ren'Py Creator
Posts: 15426
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: Flipping an ATL anchor point

#4 Post by PyTom » Thu Oct 17, 2013 6:23 pm

I think that may be a known error that will be fixed in the next Ren'Py. (The correct value is True, BTW.)
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
Graph
Veteran
Posts: 230
Joined: Sat Jul 03, 2010 7:22 pm
Completed: Touhou Mecha Chap. 1
Projects: Touhou Mecha, Eastern Starlight Romance
Organization: Dai-Sukima Dan
Contact:

Re: Flipping an ATL anchor point

#5 Post by Graph » Thu Oct 17, 2013 7:11 pm

Ah, good to know. I'll see how it goes at that time, then.

Post Reply

Who is online

Users browsing this forum: Google [Bot]