createFromTiles not working

Hello everyone!

I’m trying to make a platformer in arcade physics, as I’m kind of new to Phaser, and I don’t quite want to move to matter yet. My base tile size is 32x32, but I have this tile that is smaller. I have done some searching, and it looks like the way to go is using “createFromTiles,” I have tried to use it, but it still doesn’t seem to be working correctly. This is my code;

https://pastebin.com/JCYhz2RS

When I run the game, the objects/tiles inside the object layer (FunnyHitBox) aren’t loaded at all. As if they were never added to the tilemap.

Not sure why this isn’t working, but I would love help from anybody!
Thank You

Can you elaborate on this? You have many size of tiles? Maybe you should stick to one size and do the different sizes as objects. If you’re using Tiled it is also more practical to use ‘collides’=true in your tileset and then this.rocks.setCollisionByProperty({ collides: true }); This way the tiles you want collide and you don’t have to draw another collision layer. Object layer you should read with createFromObjects but if that’s too limited you can do something like this:

 this.tilemapObjects = this.map.objects[0].objects; // access the full object layer
 this.tilemapObjects.forEach(function(object) {  // fetch stuff phaser can't handle directly

        if(object.type == 'something') {

            // do something, e.g. create certain sprite or shape with certain properties
            // access custom properties set in Tiled

        }
 }

Also be sure to use Tiled version 1.1.6 since afaik Phaser still doesn’t support the new format.

Hi there! I found the problem, I had not been using a key in one of my lines of code.
Thanks for your reply!