This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

Changing Z-index of just the top 16x8 pixels of a 16x16 sub-tile in a tile-set .

2DFanatic2DFanatic Posts: 2Member
edited March 2020 in 2D

Hello, i'm a rookie game dev. i'm currently working on a 2D game which uses random map generation as one of the games core design. Here's how the game currently looks. :

The game uses this tileset as it's tilemap . Here's how the tile-set looks like :

The red bordered subtiles are the tiles that i want their z-index to be changed.
Is it possible to change just the top 16x8 pixels of the 16x16 subtile to 1 and the bottom 16x8 to 0.
I was able to change the top 8x8 pixel's z-index to 1 by changing the Subtile Size in the interface on the right. but by doing so messed with my bit mask as well and the image was no longer useful for auto-tile mapping.
Is there any way to change the z-index of just the top 16x8 pixels of a subtile ? Can i use tiles from another tilemap to over-lap over the tiles ? If so, how do i proceed from here ?

Edit : Is it possible to apply YSort to a subtile in a tileset of a tilemap and the player node so that when the player has a higher Y-value that the subtile on the map the tile is moved front of the player and when the player has higher.
I tried it how-ever my Gd script attached to Main node(map generation) is unable to detect the location of tile map in the Y -sort node. Here is the code in to detect the location of The tilemap node.

onready var tilemap = $Mapo # Mapo being the name of tilemap

Is there anyway to mention the location of Tilemap node which is with in the Y-sort node ?But should also work in tandem with Y-sort node ?

Tags :

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.