but i am comparing it to an integer value using the '<' operand, which are not compatible, how may i resolve this?
'getMovement' returns a Vector object. It does not have a numeric value (though it may contain one or more -- which it does).
If you notice, the 'getSpeed' uses 'getMovement().getLength()' or 'movement.getLength() which extracts the particular value from the object.