frenetikm Posted July 12, 2015 Share Posted July 12, 2015 Hi, I'm using Tiled for making a JSON map.In Tiled there is an option to do an "ImageLayer", where you can insert an image that is the size of your map. When I try to insert my map : this.map = this.game.add.tilemap('map', 40, 40, 24, 16);this.backgroundlayer = this.map.createLayer('backgroundLayer');I have an error in the browser:Tilemap.createLayer: Invalid layer ID given: null Is this possible to make maps with ImageLayer in Phaser ? Link to comment Share on other sites More sharing options...
Noid Posted July 13, 2015 Share Posted July 13, 2015 createLayer() is used to create tilemap layers. It won't accept an ImageLayer. However, this.map.images contains an array with all your ImageLayers that you can use to add a background using ...add.Image() or ...add.Sprite() http://phaser.io/docs/2.3.0/Phaser.Tilemap.html#images jdnichollsc 1 Link to comment Share on other sites More sharing options...
frenetikm Posted July 13, 2015 Author Share Posted July 13, 2015 I didn't find this in any tutorial, but it's a really helpful functionality!thanks! Link to comment Share on other sites More sharing options...
Recommended Posts