Microsoft MakeCode

How to detect walls

walls are a great way to mark certain tiles but I would like to query if there is a wall at a certain location. I haven’t found such a method yet.
Only

tiles.tileAtLocationEquals(location, sprites.dungeon.floorDark2)

which is quite hard to check for all kind of tiles which could be a wall…

any suggestions?

If you go into extensions and add

image

then in the tilemaps section there will be a

image

(we certainly agree this is annoying / this is a block that should have been builtin in the first place that we just missed initially, so it may move to be a default block eventually)

1 Like