Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tile_info.type returning 0?
#1
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:
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>


Messages In This Thread
tile_info.type returning 0? - by RootBeerKing - 08-16-2023, 04:01 PM
RE: tile_info.type returning 0? - by megamarc - 08-17-2023, 03:41 PM
RE: tile_info.type returning 0? - by RootBeerKing - 08-18-2023, 02:34 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)