ATL help.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
legendman3
Citizen
Posts: 68
Joined: Sun Jan 22, 2012 8:29 pm

ATL help.

Post 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".
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: ATL help.

Post 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.
Kurosuke needs beta testers
User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

Re: ATL help.

Post by MarekkPie »

You can usually get more support for ATL when you post in the official ATL thread:

viewtopic.php?f=5&t=2567
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: ATL help.

Post 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)
            end
        end
    end
end
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 166 guests