Jump to content

How to use imagecollection + tiled?


Tourniquet
 Share

Recommended Posts

With tiled you can use beside a tileset also a "image collection". My question how to load those pics in phaser?

Normally I'd load the tiles in preload with

game.load.image('test-tileset', 'test-tileset.png');

and then add it to the map with

mymap.addTilesetImage('test-imageset');

How is it with the image collection? I read it's automatically loaded?!

 

 

Link to comment
Share on other sites

As soon as I put an image on the map which is from an image collection i get this error:

 

02:27:36.310 TypeError: d.tiles[N.index] is undefined
Stack-Trace:
c.TilemapParser.parseTiledJSON@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:25:25738
c.TilemapParser.parse@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:25:19907
c.Tilemap@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:24:28237
c.GameObjectFactory.prototype.tilemap@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:14:20582
create@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/index.html:36:13
c.StateManager.prototype.loadComplete@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:10:24496
c.Loader.prototype.finishedLoading@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:20:3532
c.Loader.prototype.processLoadQueue@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:20:3127
c.Loader.prototype.asyncComplete@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:20:3729
c.Loader.prototype.jsonLoadComplete@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:20:13429
c.Loader.prototype.xhrLoad/f.onload@file:///C:/Users/Tourniquet/Desktop/Neuer%20Ordner%20(3)/002/phaser.min.js:20:8701
1 phaser.min.js:20:8752
c.Loader.prototype.xhrLoad/f.onload() phaser.min.js:20

 

Link to comment
Share on other sites

  • 1 month later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...