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.
-
Dollarluigi
- Regular
- Posts: 63
- Joined: Mon Aug 15, 2016 10:06 pm
- Completed: Winter Dream, School For The Friendless
- Tumblr: Rehnchoro
- Deviantart: Dollarluigi
- Skype: Dollarluigi
- Soundcloud: Dollarluigi
- Location: Probably Earth
-
Contact:
#1
Post
by Dollarluigi » Sat Mar 11, 2017 11:20 pm
I've been looking up how to get the proper sprite size and I found something that worked but it had the image too far off to the left. Is there any way I can center the image...?
My code looks something like this. What numbers would be useful here...?
Code: Select all
show sprite:
yanchor n
ypos n
xanchor n
xpos n
-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#2
Post
by Ocelot » Sun Mar 12, 2017 1:21 am
You can pass floating point values to
*pos/
*anchor. It will set position/anchor as a fraction of screen/image size. Also you can use
*align to set both position and anchor at once:
Code: Select all
show sprite:
yalign 0.5
xalign 0.5
# OR
show sprite at truecenter
< < insert Rick Cook quote here > >
-
Dollarluigi
- Regular
- Posts: 63
- Joined: Mon Aug 15, 2016 10:06 pm
- Completed: Winter Dream, School For The Friendless
- Tumblr: Rehnchoro
- Deviantart: Dollarluigi
- Skype: Dollarluigi
- Soundcloud: Dollarluigi
- Location: Probably Earth
-
Contact:
#3
Post
by Dollarluigi » Sun Mar 12, 2017 11:41 pm
Thanks for the help, but I figured out another way to fix this yesterday and forgot to say something. XD
Users browsing this forum: Bing [Bot]