Provided you have a tile with the IsPlayer property on the Platforms layer, the following should work. Good luck!
1 2 3 4 5 6 7 8 9 10 | local function loop (event) if player and gameIsActive then tileLayer = map:getTileLayer("Platforms") tile1=tileLayer:getTilesWithProperty("IsPlayer")[1] tile1:move(-SOMENUMBER,0) map:setPosition(player.x, player.y) end end Runtime:addEventListener("enterFrame", loop) |
Great snippet, this should help a lot!