Page 1 of 1

ATL help.

Posted: Fri Feb 10, 2012 10:02 pm
by legendman3
So i know that Advanced Tile Loader can detect properties. How would i make it so that if it detects a certain property it makes that tile collideable? Could I dothat with just the build in Box2D stuff? Like the property is "Solid".

Re: ATL help.

Posted: Fri Feb 10, 2012 10:34 pm
by tentus
If you're using ATL you don't need to use love.physics (Box2d). Beyond that I'm afraid I can't answer your question, I've never used ATL.

Re: ATL help.

Posted: Fri Feb 10, 2012 11:44 pm
by MarekkPie
You can usually get more support for ATL when you post in the official ATL thread:


Re: ATL help.

Posted: Sun Feb 12, 2012 8:59 pm
by Kadoba
You need to loop through the different tileIDs for each layer and then look up the tile type in map.tiles. From there you can check and see if the tile type has a certain property you are looking for.

That would look something like this:

Code: Select all

for tileLayerName, tileLayer in pairs(map.tileLayerss) do
    for y, column in pairs(tileLayer) do
        for x, tileID in pairs(column) do
            if map.tiles[tileID] and map.tiles[tileID].properties.Solid then
               CreateRectangleBody(x,y,map.tileWidth, map.tileHeight)