Provided you have a tile with the IsPlayer property on the Platforms layer, the following should work. Good luck!
[code]
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)
[/code] [import]uid: 56303 topic_id: 10816 reply_id: 310816[/import]
This moved the player constantly in an update loop, however since then there have been some helper methods added like a move() function. [import]uid: 5833 topic_id: 10816 reply_id: 64268[/import]
I have tried the code but my tile will not move is there anything else i need to add to it?
[import]uid: 29011 topic_id: 10816 reply_id: 75316[/import]