I load the map by the ATL(Advanced-Tiled-Loader-master) library which stoped update 3 years ago. I used the
new version tiled map editor 0.12 and love 0.9.2. It's maybe a problem that because the ATL didn't support the new tiled map editor file(tmx)?
lovefirstly wrote:I load the map by the ATL(Advanced-Tiled-Loader-master) library which stoped update 3 years ago.
You should really use STI - Simple Tiled Implementation, that's more up-to-date.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
function LoadTileMap(levelFile)
map = loader.load(levelFile)
gravity = 1000
FindSolidTiles(map)
for i, obj in pairs(map("Characters").objects) do
if obj.type == "player" then PlayerSpawn(obj.x, obj.y-8) end
--if obj.type == "enemy" then PlayerSpawn(obj.x, obj.y-8) end
end
map.drawObjects = false
end
"Characters" is one of the map layer in tmx file.I write this code follow the book <LOVE for Lua Game Programming>