Problems Resetting 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
User avatar
quinnsea
Regular
Posts: 52
Joined: Wed Apr 26, 2017 5:04 pm
Completed: Birch Sapling
Projects: Aspen, Baleen
Organization: Koimarina Games
IRC Nick: quinnsea
Soundcloud: nishiikigoi
itch: koimarina
Location: Missouri
Contact:

Problems Resetting Sprite Position

#1 Post by quinnsea » Tue Jun 29, 2021 2:32 am

Hey! I'm experimenting a little bit with ATL, and I managed to get my sprite to hop perfectly, but for some reason (for lack of a better word) they seem to keep getting lost? Like here they are before the ATL movement using

Code: Select all

show sprite at left
Image

And here they are after executing these lines:

Code: Select all

    show kamal closedsmile
    
    k "Jackie?"
    z "I jump up and instantly pick them up right into a big ass hug."
    
    hide prism with moveoutright
    show kamal blushlookright at center, kamalhopfocus
    with moveinleft
    
    k "H-Hey!{w=0.3} Happy to see you too,{w=0.3} {i}but I can't breathe!{/i}"
    j "Hah!{w=0.5} Aight,{w=0.3} aight."
    
    show kamal neutral at left with moveinright
    show prism smile at right, prismTransform with moveinright
Image

And here is the code for the ATL movement (kamalhopfocus)!

Code: Select all

transform kamalhopfocus(x=100, z=1):
    xcenter x yoffset 0 yanchor 1.0 ypos 1.03 zoom z*1.00 alpha 1.00 subpixel True
    easein .5 yoffset -21
    easeout .5 yoffset 0
    repeat
I had to make x=100 because otherwise despite the fact that I put center, it didn't seem to be interested in putting Kamal in the center of the screen. I tried to use

Code: Select all

show sprite at reset, center
and that didn't seem to do anything either.

Thanks in advance for the help!
ImageImage

quinn / 24 / game design student
icon by church

Post Reply

Who is online

Users browsing this forum: No registered users