SimplePath - Pathfinding Module

Hello just askin, but anyway this uses Params on the pathfinding? and is there anyway we can customize it? I have a custom AI and I would like to customize it since it has a humanoid, but sometimes it would just jump or move right above the walls, it also just try’s to push itself through a wall and it get’s stuck, so i was just wondering if it does have params, how do we like add our own to it?

Contributors: I’m sharing my experiences contributing to an open source path finding module called SimplePath. It makes walking easier, and not just for humanoids, with a simple solution that accurately recalculates routes on the fly when they’re obstructed. This ensures consistent navigation, thus an ideal solution for Roblox developers.

1 Like

Yes it does, just make sure to properly name the tags.

Hi, umm, is there a link to what you are open sourcing?

Thanks

Hey @GrayzcaIe, i’m having some problems with a script using your module, and someone suggested it could be the module itself. Could you check out my topic?

How would you add/enable truss climbing for simple path?

Put {AgentCanClimb = true} in AgentParams

How can i get GetNearestCharacter to work?

I cant get my npc to climb to me it just jumps off for some reason when its climbing

Hi,
Did you set the variable ScaredofHeitghts = false ?

how would I safely dispose of the path once the npc dies?

function BaseUnit.Update(self:BaseUnit): ()
	if self.Humanoid.Health <= 0 then self:destroy() return; end
function BaseUnit.destroy(self:BaseUnit): ()
	self.Destroyed:Fire()
	
	if self.Path._status ~= "Idle" then self.Path:Stop(); end
	self.Path:Destroy()
	
	for i, v in pairs(self.Animations) do
		v:Destroy()
	end
	
	debris:AddItem(self.Agent, 4)
	self = nil
end

I get errors like
ServerScriptService.SimplePath:287: attempt to index nil with 'LimitReached'
ServerScriptService.SimplePath:300: attempt to index nil with 'Status'

also I use task.spawn for path:Run

2 Likes

that isnt a thing right since i searched unless ur being sarcastic!!
??

1 Like

I just did this for my game:

if Goal and Humanoid:GetState() ~= Enum.HumanoidStateType.Climbing then
	Path:Run(Goal)
end

I run my pathfinding in a loop, so if you don’t, then I’m not sure why your npc won’t climb

Is there a way to get the NPC to ignore parts? Also how do I make the NPC jump?

This is a very nice system to quickly get pathfinding NPCs that don’t need to constantly halt and “rethink” their path. However, an issue I have, is that NPCs using SimplePath have a tendency to run back-and-forth, my guess is that MoveToFinished sometimes doesn’t fire, causing the NPC to “overshoot” a node on an old path, but then MoveToFinished fires on the next point in the path, and then the old path updates, causing them to run back-and-forth between two paths. Is there any way I could go about resolving this?

I made another version of simple path, it reduces the stuttering by modifying the waypoints, maybe it will fix your problem

1 Like

After giving this a try, I find that the NPCs are far too jittery and constantly “halt” and rethink their path, which is what I wanted to avoid. They also sometimes just seem to… randomly stop working alltogether and stop moving whatsoever, and just stand there, causing my game’s “stuck NPC detection” (usually for NPCs that get caught in a bind due to Roblox’s less than ideal navmesh generation) to kill them off. With SimplePath, I can stand at the end of the map and zombies will reach me, with NoobPath, unfortunately, they all get stuck and die before I see single one of them.

1 Like

Still looking for an answer to this question, having the same issue.

I modified the modulescript to detect the death in the npc and then the path is eliminated, but if you don’t modify it, I don’t know how you can do it.

umm what code did you add for the ‘fix’ ?