Unable to position sprites using xalign and yalign (SOLVED)

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
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Unable to position sprites using xalign and yalign (SOLVED)

#1 Post by Geckos »

I have a sprite that is the exact height of the screen (768) but only 738 pixels tall. I can adjust his X position, but not his Y position no matter what I do.

Positioning_problems.jpg is what it looks like in game. Rando_screenie2 is what I'd like to be able to do (but behind the textbox like a normal sprite, just using a quick example in the mockup)

My sprite coding for Mox:

Code: Select all

image mox angry:
    choice:
        LiveComposite((738, 768),
            (0, 0), Animation("sprites/mox/[mox_size]/[mox_outfit]_tail1.png", 7.45, "sprites/mox/[mox_size]/[mox_outfit]_tail2.png", .15, "sprites/mox/[mox_size]/[mox_outfit]_tail3.png", .15, "sprites/mox/[mox_size]/[mox_outfit]_tail4.png", 5.15, "sprites/mox/[mox_size]/[mox_outfit]_tail3.png", .15, "sprites/mox/[mox_size]/[mox_outfit]_tail2.png", .15,),
            (0, 0), "sprites/mox/[mox_size]/[mox_outfit].png",
            (0, 0), "sprites/mox/[mox_size]/neutb.png",
            (0, 0), Animation("sprites/mox/[mox_size]/blink0.png", 14.45, "sprites/mox/[mox_size]/side_blink1b.png", .10, "sprites/mox/[mox_size]/side_blink2b.png", .10, "sprites/mox/[mox_size]/side_blink3b.png", .25, "sprites/mox/[mox_size]/side_blink2b.png", .10, "sprites/mox/[mox_size]/side_blink1b.png", .10,),
            (0, 0), Animation("sprites/mox/[mox_size]/blink0.png", 9.45, "sprites/mox/[mox_size]/blink1b.png", .10, "sprites/mox/[mox_size]/blink2b.png", .10, "sprites/mox/[mox_size]/blink3b.png", .25, "sprites/mox/[mox_size]/blink2b.png", .10, "sprites/mox/[mox_size]/blink1b.png", .10,),
            (0, 0), "sprites/mox/[mox_size]/[mox_krokhand].png",
            )
        8.50
I've tried this and a few variants to try to move him around.

Code: Select all

        show mox angry:
            yalign -1.60 xalign 1.75 subpixel True alpha 1

            parallel:
                linear .0  zoom 1.0 alpha 1
As well as this:

Code: Select all

show mox angry at moxsword


transform moxsword:
    xalign 0.70 yalign -.80

Short of making an entire new set of sprites for different positions, I cannot think of how to handle this issue? Any thoughts/ help would be greatly appreciated!
Attachments
rando_screenie3.jpg
rando_screenie2.jpg
positioning_problem.jpg
Last edited by Geckos on Mon Jan 30, 2017 7:31 pm, edited 1 time in total.
Image ImageImage

User avatar
Geckos
Veteran
Posts: 471
Joined: Fri Aug 17, 2012 8:33 am
Completed: Brilliant Shadows, Perceptions of the Dead, The Phantom Icecream Truck
Projects: Embers of Magic, Pale Spectrum, Perceptions of the Dead
Organization: Ithaqua Labs
Tumblr: geckosart
Deviantart: sitaart
Contact:

Re: Unable to position sprites using xalign and yalign

#2 Post by Geckos »

Was able to get it to work with:

Code: Select all

        show mox angry:
            ypos 400 xpos 600
Image ImageImage

Post Reply

Who is online

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