View unanswered posts | View active topics It is currently Sun May 27, 2018 4:41 am



Reply to topic  [ 1 post ] 
 NPC Roaming Paths 
Author Message

Joined: Fri Feb 09, 2018 7:55 pm
Posts: 2
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;


Fri Feb 09, 2018 8:01 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.


Flag Counter