if path is not null then
if self x and y are within range of last node in path then
-- use the original path code below
end
target = node(current)
if distance to taget node is less than some range then
change target node to current
change target node to next node in array
if target node is greater than path length then
subtract one
end
end
-- path to node similar to original code
end
basic psudocode of the path following