Jump to content

Tilemap.createFromObjects


j0hnskot
 Share

Recommended Posts

Shouldn't the first value be "Spikes" since it needs the name i used on tiled for this object group?

 

I used this 

this.map.createFromObjects('Spikes', 'Spikes', 'spikes_bottom', 0, true, false, this.spikes);

The first value is the name of the Object group, the second should be a gid but since it doesn't have one i thought that the  'layer name within the map data' should be the same as the name of the object group.

 

But this doesn't work!

Link to comment
Share on other sites

well... afaik phaser can handle polygons painted with the polyline tool and transform them into physics bodies (not sprites.. at least not directly) and tiles on the object layer canbe transformed into sprites via a given id... correct me if i'm wrong but i think thats it.. you cant use the rectangle tool at all...

but why wouldnt you just place a little tile instead of the rectangle.. whats the problem with it?

Link to comment
Share on other sites

The reason is that i use the automap on Tiled.

Creating objects with different properties take ages to make and place by hand. So i decided to use automapping to make it faster. 

But Tiled currently bugs out if you use a tile as an object and results to not placing an object at all.

 

 

It only works with rectangles (or other shapes) so if i want to use automaping to place objects there is no other way but to use rectangles.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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