How do I set a custom transform point for an image?

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
Zeekee
Regular
Posts: 67
Joined: Wed Jul 23, 2014 10:17 pm
Projects: No One But You, The Anomaly
Organization: Annexe Interactive
Skype: ytmnd111
Soundcloud: zomgaarh
Location: USAF Academy, CO
Contact:

How do I set a custom transform point for an image?

#1 Post by Zeekee »

I have a character sprite that I want displayed slightly to the right of the center of the screen, but not all the way to the right. How do I achieve this?

Currently, I have this:

Code: Select all

show ross_tk at right
I've skimmed through the guide a few times, but couldn't find anything useful; I may have just overlooked what I needed.
"When people sometimes misquote me, I don't know if they understand what I'm saying."
-Tommy Wiseau

User avatar
yuren
Newbie
Posts: 14
Joined: Sat Feb 20, 2016 2:41 am
Projects: chomp2
Github: yosephharyanto
Skype: yosephharyanto
Location: Indonesia
Contact:

Re: How do I set a custom transform point for an image?

#2 Post by yuren »

You might have to use custom position to achieve that. The documentation is on http://www.renpy.org/wiki/renpy/doc/tut ... Your_Story

Basicly there will be x and y, at each x and y will have pos and anchor position.

pos -> your image position relative to background
anchore -> your point in the image that become the anchor for calculation, relative to the edge.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Toma