#Tilemap moved to tilemaplayer
1 messages · Page 1 of 1 (latest)
The whole point of them is that each node is a layer
So you have to create a TilemapLayer for each of those. Just put them inside a Node2D and attach your manager script to it
So how would i go around setting different tilemaplayers to a varabile in the video they could just add the tile to a layer
Just like that on line 3. But call it water_layer, grass_layer, etc
Just reference the nodes
Btw, the parent node does not need to be a TileMapLayer
They can all be siblings and children of a Node2D
Aha okay I'm with you
Now so I just create a tilemaplayer of a node2d like farm_tile_map create tilemaplayers under it then it would be how ever I draw the tiles on the tile map how they would be detected so water would be drawn on a water layer ect ect then we just add them to a var and can do what ever
The draw order is based on the order of nodes in the tree.
So the water layer should be higher up to be drawn first, causing the nodes below to be drawn over it afterwards.
You can also share the same TileSet between TileMapLayers, so you do not need a unique one for each if you do not want to.
Node2d
--- WaterTilemapLayer
--- GrassTilemapLayer
--- etc
just to clear
you just need one Node2D to parent. Not really need, but is better especially if you have a script to manage them attached to the node2d
Okay i'm puzzled if you dont make them a tilemap layer how can you put them on different layers selecting the 2d nodes i will not be able to draw on them but on the tile map i can if im using a sprite sheet how can i seperate them im so confused
Add a new TileMapLayer node for each layer.
yeah that works but i got told i could just add a node2d hella confusing
They meant as a parent of all your TileMapLayers, for organization
You do not have to, tho.
The Farm node would be the parent here. The rest of the layers can be simple siblings.
But it is up to you really. This should not really change anything.
If you want more nodes to use as folders, that is also a decent approach.
the farm tilemap is pointless right i can just get rid of that and add it to a tilemap folder
I don't know what you have set in it. But if you are not placing tiles in it, yes.
The position is a matter of organization and your taste
the farm_tile_map i was thinking it would load the tile_set for the child tilemaps but no so ive just saved the tile set to a folder and deleted it and then loaded the tile set on the water / plant tileset
Thank you for you're help
sorry if i come accross stupid
nah, there's no stupid questions.
I appreciate your will to learn.
You just need one Node2D with the TileMapLayers as children, I thought that was clear.