Animated sprite won't center.

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
Epherion
Newbie
Posts: 2
Joined: Wed Jul 20, 2016 2:10 pm
Projects: Free
Contact:

Animated sprite won't center.

#1 Post by Epherion »

I've looked everywhere for an answer to this, but I couldn't find one. If there somehow already is, I apologize.

I've made a blinking sprite. Whenever I show it in game, it appears at the left. Even when I use "at center", it's still at the left side of the screen. I've included some code just in case.

Code: Select all

image tauehidle:
    contains:
        "tauehidle1.png"
        pause 4.9
        "tauehidle2.png"
        pause 0.06
        "tauehidle3.png"
        pause 0.06
        "tauehidle2.png"
        pause 0.06
        repeat

label test:
    scene hall 
    show tauehidle
    with dissolve
    #It's not at the center.
That's all. Thank you.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Animated sprite won't center.

#2 Post by trooper6 »

How big is the image? Including transparent space? If the image has lots of transparent space, then the image may actually be centered.

So make sure you images are tightly cropped in GIMP or whatever program you use. You may then also set the xanchor for the image.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Epherion
Newbie
Posts: 2
Joined: Wed Jul 20, 2016 2:10 pm
Projects: Free
Contact:

Re: Animated sprite won't center.

#3 Post by Epherion »

321 x 600.
Here's a screenshot of what the image looks like in the game: http://prntscr.com/bvduiv
I tried setting the xanchor, but to no avail.

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Animated sprite won't center.

#4 Post by gas »

Create a transformation and apply it to the image.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Animated sprite won't center.

#5 Post by Donmai »

Try

Code: Select all

show tauehidle, center
Or left, right, or any other position you may define.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: Google [Bot]