SpriteManager leading to overlapping sprites

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
redeller
Newbie
Posts: 10
Joined: Fri Aug 12, 2022 5:14 pm
Contact:

SpriteManager leading to overlapping sprites

#1 Post by redeller »

Hello, I am running into a problem with overlapping sprites in my screens in renpy. I am using SpriteManager's method like so (if spritemanager is named af_sprites)

Code: Select all

t = Transform(child = "../images/imagehere")
af_sprites[-1].set_child(t)
this is for whenever I update the animation of a certain sprite on my screen. It works perfectly fine at first, but if I reload the screen in any way (either because I restart the minigame, or load a previous save and go there), the past children of the sprite start overlapping? Like past children just show up behind the current child, and I have tried renpy.restart_interaction() but it doesn't seem to change the overlapping problem. Any ideas?

Post Reply

Who is online

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