# Custom property for specific cells?

**URL:** <https://discourse.mapeditor.org/t/custom-property-for-specific-cells/6113>\
**Category:** Questions\
**Created:** [April 11, 2023, 7:36pm UTC](https://discourse.mapeditor.org/t/custom-property-for-specific-cells/6113 "2023-04-11T19:36:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![C\_K](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/c_k/32/3727_2.png) [@C\_K](https://discourse.mapeditor.org/u/C_K)\
**Post date:** [April 11, 2023, 7:36pm UTC](https://discourse.mapeditor.org/t/custom-property-for-specific-cells/6113/1 "2023-04-11T19:36:40Z")

</div>

I have a tilemap and I want to give some cells a specific value so I can target them in code later on. I have tried to add a custom property to a tileset but that seems to add the same custom property to every tile in that tileset.

Is there a way of doing this?

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 11, 2023, 7:46pm UTC](https://discourse.mapeditor.org/t/custom-property-for-specific-cells/6113/2 "2023-04-11T19:46:40Z")

</div>

No, Tiled has no way to assign properties to cells. You can assign custom properties to _tiles_ in a Tileset, but that’ll affect every instance of that tile.

Depending on what _exactly_ you need these custom properties for, other approaches are possible:

- Cell-sized Objects holding arbitrary custom properties. This is appropriate if only a small number of cells need properties, but the number of different properties is great.
- Tile layers with special tiles that communicate the meaning. This is appropriate if you don’t have a very large number of different properties/values that need to be assigned, and is most efficient when most cells need some values assigned. You can get more mileage out of a small number of tiles if their exact meaning depends on the exact layer they’re on. For example, a set of tiles might communicate collision shapes on a “collision” layer, but light direction and intensity on a “light” layer.

I personally use the latter approach for my own games, and it’s been more convenient than per-cell properties would’ve been. But, as mentioned above, it really depends on your exact needs.

---

<div class="post-metadata">

**Author:** ![C\_K](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/c_k/32/3727_2.png) [@C\_K](https://discourse.mapeditor.org/u/C_K)\
**Post date:** [April 11, 2023, 7:48pm UTC](https://discourse.mapeditor.org/t/custom-property-for-specific-cells/6113/4 "2023-04-11T19:48:28Z")

</div>

That’s a shame, would be a really nice feature. But thank you very much for the help!
