K, this is nice makes my life 10x easier.
How would I make it so it automatically knows when to jump?
Are you using a part or an npc? I believe npcs jump automatically if the AgentHeight is high enough. With a part, try using RayCasting with the EZRaycaster module to tell how far a part is in front, behind or to the side of the teeming part.
Another question is, How do I constantly update the path so it follows a moving player?
I might create a better way and more efficient way of updating a path but using RunService functions + Creating and following new paths could work. I believe there are functions in this module to chase and find the closest player.
Does the module require your NPC to have a player script called âAnimateâ?
NPCâs dont jump automatically, there is a article on PathWaypoint, in which there is a Action property that can tell you which waypoint does the NPC needs to jump
No, it does not. I would add it if you want an animation but it is not required. While moving, it will stay in the regular pose and have no animation.
Hello, can you explain more on ChaseNearestPlayer()
? Can I get the name of the player
or player Instance
? Because I only want it to chase a certain team of players
I think thatâs a typo for chase, right?
You can check for a playerâs team color using if statement.
Yes it was a typo. So how do I return
the player?
I am confused about ChaseNearestPlayer() because it doesnât return anything. If you are talking about GetNearestPlayer() then it returns a character. You can then use Players:GetPlayerFromCharacter(char Obj.) to get the player Instance.
May I ask about the default module settings? Jump Power and Walkspeed. Is it 50 and 16 respectively? Also, what is the PFparams?
FindNearestTorso function is highly inefficient, I suggest looping through players in PlayerService to find the nearest Torso, or if they are NPCs, put them in a separate folder and loop through the folder.
An extension or rather a new module that I wouldnât count as a new version is coming out soon! Make sure to look for that.
Details
It can be applied to all newer EZ Pathfinding modules. It can also act as a separate module not connected to EZ Pathfinding modules. It will include all newer pathfinding functions and add more functionality to this module.
From what I know this is the most efficient way of achieving a successful wrapper for the Pathfinding Service.
No offense, but you really need to incorporate OOP. This isnât very efficient, nor intuitive.
Other then that, interesting concept.
I suggest that a path created by Module.new
have its own move method.
How so? I believe this is very efficient if you are not creating many paths at a time. It is also meant mainly for making Roblox pathfinding functions and not for a alternate pathfinding service.
I donât really understand by what you mean about incorporating a move function in the module.new function? Do you mean having another parameter and if true, moves on the created path right away instead of having to call the move function separately?