# Boolean properties in Tiled

**URL:** <https://forums.solar2d.com/t/boolean-properties-in-tiled/323650>\
**Category:** Million Tile Engine\
**Created:** [March 17, 2014, 9:56am UTC](https://forums.solar2d.com/t/boolean-properties-in-tiled/323650 "2014-03-17T09:56:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thassman](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/t/5fc32e/32.png) [@thassman](https://forums.solar2d.com/u/thassman)\
**Post date:** [March 17, 2014, 9:56am UTC](https://forums.solar2d.com/t/boolean-properties-in-tiled/323650/1 "2014-03-17T09:56:11Z")

</div>

Hi,

When i assign a property in Tiled, as a boolean it is recognised in MTE as a string.

Ex:

in Tiled i set a property

isEnemy = true

when i check that property in tiled it is object.properties.isEnemy == “true” instead of boolean true

I have manually worked around it, but it aint pretty.

Am i doing anything wrong here ?

Cheers,

Tommy

---

<div class="post-metadata">

**Author:** ![dyson122](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/9fc348/32.png) [@dyson122](https://forums.solar2d.com/u/dyson122)\
**Post date:** [March 17, 2014, 1:33pm UTC](https://forums.solar2d.com/t/boolean-properties-in-tiled/323650/2 "2014-03-17T13:33:27Z")

</div>

Hello thassman,

Tiled stores every property as a string, including numbers and what we would recognize as boolean values like true and false. As far as I’m aware there’s no way to change this. The best you can do is use the shortest string possible for your commonly-used values. Comparing two long strings like “true” and “false” takes longer than comparing two short strings like “0” and “1”.&nbsp;

---

<div class="post-metadata">

**Author:** ![dyson122](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/d/9fc348/32.png) [@dyson122](https://forums.solar2d.com/u/dyson122)\
**Post date:** [March 17, 2014, 1:33pm UTC](https://forums.solar2d.com/t/boolean-properties-in-tiled/323650/3 "2014-03-17T13:33:27Z")

</div>

Hello thassman,

Tiled stores every property as a string, including numbers and what we would recognize as boolean values like true and false. As far as I’m aware there’s no way to change this. The best you can do is use the shortest string possible for your commonly-used values. Comparing two long strings like “true” and “false” takes longer than comparing two short strings like “0” and “1”.&nbsp;
