GMS 2 [SOLVED] Set depth for individual tiles

Gigicom

Member
Hello

Last few days I was searching all over Google for a way of setting the depth (basically like with depth = -y for objects) for an individual tile. I saw lots of threads, but most of them just ended with links to other tutorials that only used the layer depth or the tile_set_depth function of GMS1.

Is there a solution for this or is there simply no other option than to use instances and code a script to autotile?
 

samspade

Member
Hello

Last few days I was searching all over Google for a way of setting the depth (basically like with depth = -y for objects) for an individual tile. I saw lots of threads, but most of them just ended with links to other tutorials that only used the layer depth or the tile_set_depth function of GMS1.

Is there a solution for this or is there simply no other option than to use instances and code a script to autotile?
As far as I know, the only way to add tiles is to a tile layer. You can create tile layers in the room editor or in code. You can assign those layers depth. But you can't have the different tiles on the same layer be at different depths (again as far as I know and I reviewed the manual and did a google search as well).

I've never tried it, but it would be possible to create a system that just creates a lot of layers to achieve a depth = -y like affect, but I don't know how optimized it would be. I think it would probably be easier just to use instances or sprites and some type of draw controller like Friendly Cosmonaut uses.
 

Gigicom

Member
Sorry for this late response and thank you for your answer.

I'm now just using lots of layers for every different wall depth and my room editor is lagging like hell. I think it's pretty weird though that there is no other option for this...
 
Top