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
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 »

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: 16093
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 »

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
Software > Drama • https://www.patreon.com/renpytom

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 »

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 65 times

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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 »

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
Software > Drama • https://www.patreon.com/renpytom

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 »

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

Post Reply

Who is online

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