Malicondi wrote:

JachiiStudios wrote:

Hey, i do not see how that would work. The “go to front” is there just like any other visible sprite, and if it wasn't there, let alone a go BACK one layer, it would show behind everything else which is NOT what i want. The stop other scripts in sprite happens only whenever a new animation plays, and it makes sure that any other animations stop playing, i don't see at all how that would change the layering.
They mean to in the player sprite, to add a “go back one layer”. The problem is, that since the player sprite's layering is getting messed up because when it stops it's scripts, it goes to the back layer because all the other sprites go to the front layer before them, resulting in the player doing it's scripts last, and since it's script is to go to front, and it's doing it last, it ends up in front of the background.

You can simply fix this by adding a “go back one layer” after the go to front, and it's layering stays correct.

The problem is that the player doesn't go to front after the other sprites do, they all change layers every frame and the order they change their layers does not change, and THAT is the part i'm confused about.

This is the script that updates the positions and layers of everything:
when I receive [StartLoop v]
forever
broadcast [PlayerTick v]
say [^^^ This just updates the physics]
broadcast [LevelBGDraw v]
say [^^^ Moves the level background's position and sets layer to front]
broadcast [PlayerDraw v]
say [^^^ Moves the player's (visual) position and sets layer to front]
broadcast [LevelDraw v]
say [^^^ Moves the level's (visual) position and sets layer to front]
broadcast [LevelFGDraw v]
say [^^^ Moves the level foreground's position and sets layer to front]
end

This script is stopped when the player dies and then re-enabled after 2 seconds (and a SICK camera animation)

Seriously, what could be causing this?
Also, if i added a “go back one layer” that would achieve the same result as if i changed the order of the blocks so that PlayerDraw is broadcasted before LevelBGDraw, which is either way not what i want