I am new to Lime and this is probably an extremely silly question, but I am having trouble getting the tile reference. Basically, I want to get the collision between two objects (player and hazard), and reposition one of the objects (the player). I have the logic set up and I’ve gotten the collision down, but I don’t know how to reposition the player.
I know from looking at the Lime API that slideToPosition() will probably work, but that requires me knowing the Tile reference (i.e., tilename:slideToPosition(…) ). I tried grabbing the initial player position from Tiled by doing the following:
[lua]local position = { row = 1, column = 1 } --This is the position given to me in Tiled where I placed the player
local someTile = map:getTileAt(position, false)
–someTile:slideToPosition(100,20,100)[/lua]
However, map:getTileAt() is giving me nil. Any suggestions?
[import]uid: 52208 topic_id: 27942 reply_id: 327942[/import]