I am having an issue with new sprites added to my scene for a platformer project I am working on. All sprites have a z-order value of 1, and appear behind my tiles, even when I set them via a script or even manually.
Is this a bug with the latest update? I can show screenshots later if needed.
Are your sprites placed in different layers?
No, all on the base layer. I do have a UI layer but that one works fine.
On what order is the platform thing on?
You mean the collision mask? Or the background tiles?
The tiles are on the base layer with a z-order of 1. The collision masks vary but that doesn’t matter since I hide them when the level starts.
Do you have an event that creates new object like
create object enemy? If so, add this another action, Set Z order of YourEnemyObject to Tiles.ZOrder() + 1, below the create object action.
Thanks for this. I will try this out later.
Okay so I just tried that and it didn’t work. This is very weird. lol
No, all sprites used in the game world are on the base layer.
Thats odd, do you mind if you send your project here? I’ll take a look at it.
Hello, problem is now fixed
The problem is caused by setting the Z order of enemies before they got created. That’s why when they are created, they have Z order default = 1.
here is the file
btw, I just renamed the title if you dont mind.
Your rar file is damaged and cannot be opened. Thanks for helping me though.