Creating Custom Data Layers with the TileSet
In this recipe, we are going to use a Custom Data Layer. We will name it Coins
to add an Int
variable with a value of 10
. In the two previous recipes, we edited the tile and then confirmed the settings in the Paint properties. This time, we are going to only set up the Paint properties before we paint the tile in the TileMap.
Getting ready
For this recipe, we are going to continue from where we left off in the last recipe.
How to do it…
First, we are going to create an alternative tile to add a navigation layer to the tile:
- In the TileSet editor, go to the section to the left of the sprite sheet. Left-click on Select, which is in between Setup and Paint.
- In the TileSet editor, right-click on the yellow $ in the sprite sheet. Its atlas coordinates are
(
2, 14)
.
Figure 8.10 – Atlas coordinates (2, 14)
- Left-click on Create an Alternative Tile from the drop-down list. ...