[SOLVED] Z-order bug when using new update?

Hi again,

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. :slight_smile:

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.

1 Like

Thanks for this. I will try this out later. :slight_smile:

1 Like

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.

1 Like

No problem at all! Here you go: Gofile - Free file sharing and storage platform

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

https://www.mediafire.com/file/392df17uukfy7lz/2_platformer_fantasy.rar/file

2 Likes

btw, I just renamed the title if you dont mind.

1 Like

Your rar file is damaged and cannot be opened. Thanks for helping me though.

https://www.mediafire.com/file/ukm49o7bqyqpgm1/platformer_fantasy.7z/file

try this.