• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

GMS 2.3+ Possible bug with 9 slice? Bugs out finding tile map layer id

Took me a while to figure this, seems to be a bug with 9 slice.

I have a tile map layer, an assets layer (with a 9 slice sprite) and an instance layer with an object.

In the object I use the draw event to draw part of the tile map (the tile map layer is hidden on room start).

If the asset layer (with the 9 slice) is above the tile map layer then the follow error happens


Simply moving the asset layer below the tile map layer resolves the issue and all works as expected.

If I move the asset layer above the tile map layer and delete the 9 slice it all works again. If I add the 9 slice back (keep layers as are) I get the errors.
If I have a regular sprite on the assets layer it all works regardless for layer order, only when I add a 9 slice does it require the asset layer below the tile map layer.


Friendly Tyrant
Forum Staff
Seems like a bug indeed! Please create a YYZ of the project and file a bug report (from the Help menu > File A Bug).