Quick tip to those trying to make a dash style game...

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!

views:1575 update:2011/10/13 16:30:09
corona forums © 2003-2011