You could also use an array t do this and just store the uid of the object in a grid space (beware one object will have a uid of 0).
So assuming you set up the level so at most one object is in a grid you could do:
Start of layout
--- array: set size to (layoutwidth/32, layoutheight/32, 1)
--- for each sprite
------ array: set at (sprite.x/32, sprite.y/32) to sprite.uid
so basically if a grid location is 0 it's empty otherwise it's the uid of the object in it. To do movement you'd set the grid of the destination grid to the uid first and then when the sprite arrives there you can set the old position to 0 again. Some instance variables can be used for that.