EZ Pathfinding Pro
Download: EZ Pathfinding Pro - Roblox
GitHub Repository: GitHub - Targetry/EZ-Pathfinding-Pro at 1.0
About this Module
EZ Pathfinding was created to enchance PathfindingService and to make it easier to use. This module adds benefits to the existing service plus incorporates OOP. This allows you to work with Pathfinding without disturbing your workflow. It is a newer version of the EZ Pathfinding series. It sadly will be the last EZ Pathfinding module however updates will be frequently made. Making pull requests can be done on the GitHub repository. Extensions are allowed however they must be approved by me before being released to the public. This module is under the MIT License.
Setup
- Download the model via the link at the top of this topic.
- Once downloaded, insert it into your game by going to the toolbox and selecting “Your Models”.
- Read through the GitHub repository for examples, documentation, and more details about this Pathfinding module-script.
- Using the collected information, insert a script into the npc that will be moving along the path and type in the necessary info needed to create a path and put the npc in motion. If you are having trouble creating a workable script, contact me or use the example I provided in the repository.
Documentation
module.new (npc, end, vector, array, power, PathSettings)
Using the function module.new will create a new path using the provided parameters.
The “npc” parameter should be the path to the rig model or part that is moving along the path. Example: workspace.Rig
The “end” parameter should be the path the goal/end of the path (this is where the npc will be directed to). Example: workspace.End
The “vector” parameter is optional if you put in the path to the goal with the “end” parameter. Setting this param requires a Vector3 int. The npc will be directed to the desired location using the vectors. Example: Vector3.new(6, 0, 6)
The “array” parameter only needs to be filled in if you are looking to use the ArrayMovement function. This parameter should contain an array with the various parts that the npc needs to travel along. Example: {[1] = workspace.Part1, [2] = workspace.Part2, [3] = workspace.Part3}
The “power” parameter is for use for the jump function. If you are not going to use the jump function, don’t fill this in. This should be a int (number). Depending on the power, jumping may vary in height.
The “PathSettings” parameter is for customizing path/npc behaviours. It is used for the “SetSettings” function. The array does not need to contain everything, only the things you want to change. Example: {[“Tweening Info”] = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), [“AgentParameters”] = 10, 5, true, [“Movement”] = {[“WalkSpeed”] = 16, [“JumpPower”] = 50}}
path.Move
This function will set the npc in motion along the path. In order for it to work, you need to have successfully created a path prior to calling this function.
path.ArrayMovement
This function requires the array parameter to be filled in with correct details/paths. The npc will move along the path provided. It will reach each part in the array before heading towards the end.
path.Pause
Calling this will pause the currently running path. Can be resumed with the path.Resume function.
path.Resume
Calling this function will resume a paused path. If the path is not paused, this function will do nothing.
path.Stop
Calling this will completely stop the path. It will not run nor will it be able to be resumed.
path.Jump
Depending on the “power” parameter, the npc will jump upwards (or in a jumping motion if the npc is a part) at a faster/slower rate. The power also determines the height of the jump.
path.SetSettings
Using the provided array, it will change values to your liking, allowing for easier use of the module. Calling this requires the “PathSettings” parameter to be filled in with an array containing the desired modifications.
path.CalculateTime
Calling this will return an int of the estimated time it will take the npc to reach the goal.
Thank for taking the time to read through my topic. Be sure to contact me for help or submit a pull request if you find an issue! Please vote on the poll so I have a better understanding of how people are liking this so far.
- I love this module; wouldn’t change anything.
- I have some feedback (contact me)
- I have lots of feedback (contact me)
0 voters
Have a wonderful day!