PIXI locations...

So I get that if I want a PIXI sprite to be above the tilemap, I can add it to SceneManger._scene. But if I'd like it at the tilemap level where would it go? And where would it go if I want it below the tilemap?

edit: Below is.... SceneManager._scene._spriteset._parallax Now I just need to figure out what the same level is.

edit2: The tilemap level appears to be.... SceneManager._scene._spriteset._tilemap though this causes a graphical glitch as the tiles will rapidly switch between those and the added image. So now my question becomes, how do I order them so that doesn't happen?
Oh!
I think I know that! ^^''
But I don't have my computer now 🙁
When you type this(or something like that):
SceneManager._scene._spriteset._children
You will see all the sprites on the map in the hia layer order. You can find the pictures layer for example.
When you add the sprite, you can use .addChildAt(sprite, index).
This way you can choose the layer you will be putting it.
This is what I can remember without my pc 🙁
But I found this explanation on the porygs tutorials:


Poryg explain this better than me hahaha xD
If
is not in this video, is in another one that he made.
You shouldn't be getting that effect from adding a child to the tilemap. How/when are you actually adding the sprite?
@Eliaquim Thanks! I'm going to have to watch that video. I switched the command to
SceneManager._scene._spriteset._tilemap.addChildAt(sprite, 0); This seems to fix the problem. Of course I need to create a simple test as 3am me thought it was funny to redo the entire title screen (I'm using a map). Since I'm using layered graphics, event creation, and tile changing and animations on that... It was probably a poor test bed. 😅 To be fair, I don't even need anything at the tile map level for that map. But while I was looking for the parallax stuff, it seemed like I should find the tilemap level as well.

This has me thinking if I spawn in an event, then have it constantly update the X,Y of the sprite with screenX, screenY of the event. That should lock the image in place. Then I can make a check against a range for that screenX, screenY (to account for the size of the sprite), against a range for the player's screenX, screenY.... Creating a sudo pixel collision system. :LZSexcite:

@Silva At a regular game map (masquerading my title), by adding a PIXI.Sprite.from() originally using SceneManager._scene._spriteset._tilemap.addChild(sprite); I baked it all into a plugin because I'm way too lazy to constantly enter more than a single line of script. :LZSwink:
Though I'm still not sure why adding a child at the end was causing the problem, I'm glad you've found a solution. 😂
I ran a new test using that command on a different map, and there was no glitch. It's honestly just because an event was spawning other "below character" events with an animation on top of the edge of my pixi sprite. Somehow that interaction causes the glitch.

Original thread: https://forums.rpgmakerweb.com/threads/pixi-locations.118926/