do you mean how to make an object snap to grid?
if so you can do:
set object x to round(object.x/8)*8
and replace 8 with whatever gridsize you want, or a variable
do the same for Y
if your hotspot is in the top left corner, use int() instead of round()