0

I'm loading a TMX file of size 32x32 and I want to be able to control the size and images of the sprites generated from JSTileMap after creation.

I am able to change their size but I am unable to get what tile image it is to load the appropriate image.

If someone knows how to edit the code of JSTileMap so that it can load the 2x of my images that would work too.

The method that I am using to retrieve those tiles after creation

for var a = 0; a < Int(tileMap.mapSize.width); a++ { 
for var b = 0; b < Int(tileMap.mapSize.height); b++ {
// here I can retrieve the tiles and alter their size but I am unable to differentiate what tile image it is so I can't load the correct image
}}
Wraithseeker
  • 1,884
  • 2
  • 19
  • 34
  • Have you had a look at using the gID to figure out what type of tile it is? I can't quite understand what you are trying to ask - are you trying to find one particular tile, or any tiles with the same image? – Jack Chorley Apr 21 '15 at 13:12
  • I understood from other similar threads that the GID of the tile can change depending on your tmx file and I have about 50 of those maps so that can't work out for me. I'm trying to find tiles of the same image. – Wraithseeker Apr 21 '15 at 13:50

0 Answers0