Nice job bringing up another old thread!
Anywho, vex/vecy will return the direction in which the operation points. So, let's say your xVal is 32 and you want it to be 30. So vecx( 32-30) would give you -1 since you are to move left. Up would -1 of vecy and so forth, if you aren't moving it will return 0. By graal magic it works with direction values too, 0-3. So if your face south your vecx would be 0 and vecy would be 1.