NPC Roaming Paths

Post Reply
Safhaven
Posts: 2
Joined: Fri Feb 09, 2018 7:55 pm

NPC Roaming Paths

Post by Safhaven » Fri Feb 09, 2018 8:01 pm

Does anyone have a fix for the NPC pathfind?
Before, mine would stop at the last node in the list and not move anymore.

I currently have a small fix for it but just curious if anyone had a permanent fix for it.

if anyone wants my temp fix, here is what i have done

function onPath(npc)
--Make sure you first path location is your last path location--
--Otherwise it will disappear and reappear at the first location--
if (npc:isFollowingPath() == false) then
npc:pathThrough(pathfind.first(path));
npc:setPos(pathfind.first(path));
end

pathfind.patrol(npc, path);
end;

Post Reply