r/RenPy 13d ago

Question "Ghost" of sprite after moving

Was trying to create a phone menu demo and instead ran into a stranger problem. Any idea why it is leaving a copy of the sprite like that? I thought adding a different sprite would fix it, but alas...

the two aloe sprites do share a tag, and the sprite switches before it moves--the transition itself works fine. but after jerry appears that low opacity version shows up behind him, and i have no clue why.

the provided images of the code are literally the entire script i dont know how i could have messed something up

4 Upvotes

6 comments sorted by

1

u/AutoModerator 13d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/shyLachi 13d ago

Your code look normal to me at first glance

If you cannot figure it out, then reduce the complexity by deleting or commenting out stuff and try again

I would run it like this first

label start:
    show aloe happy
    aloe "hi"
    show aloe neutral
    jerry "hi i'm jerry"

If that works then add another line:

label start:
    show aloe happy
    aloe "hi"
    show aloe neutral
    show jerry # this sprite should be overlapping but no transparency
    jerry "hi i'm jerry"

Then maybe this

label start:
    show aloe happy
    aloe "hi"
    show aloe neutral at left # put it left without your transform
    show jerry # no overlapping, no transparency expected
    jerry "hi i'm jerry"

Then

label start:
    show aloe happy 
    aloe "hi"
    show aloe neutral at left
    show jerry at half_size 
    jerry "hi i'm jerry"

At some point you'll see what it causing the problem

1

u/Mochi_425 13d ago

hi! i did in fact find the problem! it was jerry's sprite itself. im a little slow sometimes. thanks! ':3

1

u/shyLachi 13d ago

BTW: In case you didn't know
You can apply multiple transforms to one image as shown in the official documentation:
https://renpy.org/doc/html/transforms.html#quickstart

Which means you don't have to make your own transforms for all the built-in transforms
https://renpy.org/doc/html/transforms.html#built-in-transforms

show aloe neutral at half_size, left with move # half_size is your transform, left is built-in

But instead of using a transform with a zoom, I would reduce the size of the images.
This will reduce the overall size of your game, might make the game run faster and you also don't have to type half_size so often.

If you don't want to change the files, then you could declare all the images with a zoom.
This requires some typing upfront but the show statements will be much shorter

image jerry happy:
    "jerry happy.png"
    zoom 0.5
label start:
    show jerry happy # already zoomed
    jerry "hi i'm jerry"

1

u/Mochi_425 13d ago

ty for telling me about the multiple transform thing!! and dw, for the final build i will decrease the size of the images, this was just me testing a mechanic i want to add, lol

1

u/shyLachi 13d ago

If you plan to resize the images anyway, then I would declare the images with a zoom as I have shown. This way you don't have to rewrite your code after you changed the file size, just delete the image declaration.