Sprite position

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
misterblueeye
Newbie
Posts: 1
Joined: Tue Sep 16, 2014 3:32 am
Contact:

Sprite position

#1 Post by misterblueeye »

Hello together!

I have a question about character sprites and their position. I'm not sure how i should use the character sprites.
I want to show the characters from the hip upwards like in the Ren'py tutorial game. So maybe it's good to cut the image of the character at the hip and just show it at "center". Like the image of "Lucy" in the Ren'py tutorial game.
But on the other hand...what if I need to show a character a litte bit away from the player. Then I need a smaller image of the character and the legs too. I know that i can zoom the picture at 75% or something, but the legs would still be missing because i cut them.
So maybe I shouldn't cut the sprite at the hip but make a custom position for the sprite a litte bit under the screen that the legs are still there but aren't shown.
I just don't know what the best way is.
Can you please give me some tips how to solve this?

PS: English is not my native language, so please ignore grammatic errors ^^

misterblueeye

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Sprite position

#2 Post by Alex »

You can use im.crop to make character sprites from your images, like

Code: Select all

image char close = im.Crop("full_body_sprite.png", (0, 0, 100, 307))

image char full body:
    "full_body_sprite.png"
    zoom 0.75

image char full body ver_2 = im.FactorScale("full_body_sprite.png", 0.75)
http://www.renpy.org/doc/html/displayab ... nipulators
http://www.renpy.org/doc/html/atl.html

Post Reply

Who is online

Users browsing this forum: No registered users