If you want to know how Nillo made it, I'd say, simply ask him ;)
A simple example showing how to move objects grid-based can be learned here:
Grid Movement Alternative.cap
I made it as an example for another issue, so it's just a basic hint, something to start with. It does not use the grid movement behavior, that makes it versatile.