#Is it possible to hide a single tile in a tilemap?

13 messages · Page 1 of 1 (latest)

forest sleet
#

Basically user steps on tile, and I am going to remove the tile and the player falls though. Follow up question, is it possible to have the X.Y of a layer in a Tilemap change programmatically?

harsh mountain
#

yes, you can remove the tile

#

with set cell set the source id to -1

forest sleet
#

@harsh mountain As to the other question? Can you set the X and Y of a layer on a tilemap? So say a person is walking by a window and the background changes angles to match what they should see?

harsh mountain
#

I don't know what you mean

#

You can't change the position of a layer, just the entire map

forest sleet
#

Shame. Additionally, how do you get the source id?

#

I set up a collisionshape2d, and how do I now get the source id of the tile I have set the collision shape on top of?

harsh mountain
#

The source id is in the tileset docker

#

The source id is just part of it though

#

You also need the atlas coordinates

forest sleet
#

Perhaps I have misunderstood your answer, but it sounds like your talking about turning off the tileset image, so all of that image used would now be invisible?

#

Where as I want to turn off a single one, in a tilemap.