@Rawrbear yep this is correct. I'm not 100% sure what you're exactly trying to do, but there is a problem in your code. Currently, you have this:
Set Position X(512) Y(912)
-Set Position X(512) Y( (Self Y + (406 - Y Position)) / 2 )
Let's substitute the Self Y position with 912.
-Set Position X(512) Y( (912 + (406 - 912)) / 2 )
Which moves the square to Y 203.
Now the equation is this:
-Set Position X(512) Y( (203 + (406 - 203)) / 2 )
Which also equals 203. So now the square can't move anymore.