Doodlemeat Posted May 3, 2014 Share Posted May 3, 2014 Hello. I am playing around with Phaser tilemap and I stumbled upon the putTile() method which is very neat except from one thing. I don't understand the first parameter. map.putTile(1, 0, 0, backgroundLayer); To get the first image, located in the upper left corner, I have to put 1 as the tile index, but I think that is wrong. 0 is the first index position and therefore, it should work if I put a 0 as first parameter. But if I do that, I get this error message: Uncaught TypeError: Cannot read property '2' of undefined phaser.js:53733 I am using Phaser 2.0.4 Link to comment Share on other sites More sharing options...
Geoeo Posted May 4, 2014 Share Posted May 4, 2014 I think tile index is the id of the tile in the tile sprite sheet.So i think you have to check in your tilemap.json what tile id is Link to comment Share on other sites More sharing options...
Recommended Posts