# Can Automapping be used to delete tiles?

**URL:** <https://discourse.mapeditor.org/t/can-automapping-be-used-to-delete-tiles/5731>\
**Category:** Questions\
**Created:** [July 24, 2022, 11:46pm UTC](https://discourse.mapeditor.org/t/can-automapping-be-used-to-delete-tiles/5731 "2022-07-24T23:46:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Chelaru](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/victor_chelaru/32/69_2.png) [@Victor\_Chelaru](https://discourse.mapeditor.org/u/Victor_Chelaru)\
**Post date:** [July 24, 2022, 11:46pm UTC](https://discourse.mapeditor.org/t/can-automapping-be-used-to-delete-tiles/5731/1 "2022-07-24T23:46:52Z")

</div>

I am new to automapping so please forgive me if I am misunderstanding how this works. I have created a rules TMX file with the following layers:

regions:  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/a/a41d98a358b7df04619ba97a48bab152d9ee404e.png)

input\_GameplayLayer:  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/e/ea8205064ffbae2a4ab7809904d8e25734039ea3.png)

output\_GroundLayer:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/d/d7efbd66637da96b691dadf1755a076897e4fd2f.png)

For the last image I made the input\_GameplayLayer and regions invisible. Notice that there is no tile above the **Empty** MatchType. I am using Tiled 1.9.

My RulesMap.tmx has the DeleteTiles property set to true:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/a/abd3dfce3c84774f7a70dc42aaf5f229b09dea03.png)

If I reference this rules map in another map, I am able to paint my red brick tile and it produces the block as expected:

![24_17 45 09](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/9/94355cb8fd002d34721a9dc963574d0c160f3af2.gif)

However if I delete the bricks, the block tiles that were previously added are not removed. I expect that this should happen because I have set up a rule where empty blocks do not have any tiles using the Empty AutoMap Rules tileset. Why is Tiled not picking up on this? Is this not intended behavior?

![24_17 47 28](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/1/1f62ee0ee08bfd437ae1f05682dd811486d0df16.gif)

---

<div class="post-metadata">

**Author:** ![Victor\_Chelaru](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/victor_chelaru/32/69_2.png) [@Victor\_Chelaru](https://discourse.mapeditor.org/u/Victor_Chelaru)\
**Post date:** [July 25, 2022, 12:06am UTC](https://discourse.mapeditor.org/t/can-automapping-be-used-to-delete-tiles/5731/2 "2022-07-25T00:06:36Z")

</div>

Thanks to @eishiya for answering this in Discord - the problem is that my output tile was blank. To solve this, my output tile needs to have a Tile with the MatchType Empty. I painted this tile on my output as shown here:

![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/8/8b965252333a4da393ce3f15698825de74544692.png)

This worked!

Now if I erase a tile in the GameplayLayer, tiles are also erased on the output:

![24_18 06 18](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/e/ecc1fb22e7a818cdf0fde4bc1c6892bc2e4b976e.gif)
