ATL help.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- legendman3
- Citizen
- Posts: 68
- Joined: Sun Jan 22, 2012 8:29 pm
ATL help.
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".
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: ATL help.
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
Re: ATL help.
You can usually get more support for ATL when you post in the official ATL thread:
viewtopic.php?f=5&t=2567
viewtopic.php?f=5&t=2567
Re: ATL help.
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:
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
Who is online
Users browsing this forum: Google [Bot] and 218 guests