One way could be to do this:pos = {x:x, y:y}movement_and_collision(blah blah blah)spd = point_distance(x,y,pos.x,pos.y)
Thanks! Everything working great :]