08-16-2023, 04:01 PM
Hello, I'm trying to get collision to work with the forest sample. I've added types to the tileset in Tiled, but when I go to get the tile type using
TLN_GetLayerTile (LAYER_FOREGROUND, 11*16,12*16, &tile_info);
the number I entered in the tile type in Tiled doesn't show up, I only get a 0 returned when I print it using std::cout << tile_info.type << std::endl;
Is this a bug, or did I do something wrong?
This is my tileset file:
TLN_GetLayerTile (LAYER_FOREGROUND, 11*16,12*16, &tile_info);
the number I entered in the tile type in Tiled doesn't show up, I only get a 0 returned when I print it using std::cout << tile_info.type << std::endl;
Is this a bug, or did I do something wrong?
This is my tileset file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.2" name="tileset" tilewidth="16" tileheight="16" tilecount="240" columns="20">
<image source="tileset.png" trans="ff00ff" width="320" height="192"/>
<tile id="67" type="2">
<properties>
<property name="type" type="int" value="2"/>
</properties>
</tile>
<tile id="68">
<properties>
<property name="type" type="int" value="1"/>
</properties>
</tile>
<tile id="69">
<properties>
<property name="type" type="int" value="1"/>
</properties>
</tile>
</tileset>