#How do I create a pathfinding system?

21 messages · Page 1 of 1 (latest)

pallid gorge
#

Hya! I'm still fairly new (around a year) to scripting. I want to create a pathfinding system which allows a humanoid to move from one set waypoint to another waypoint close to the player while following a path of different waypoints. How could I go about this?

I only need to know how to create a system so the npc can create a path from these set waypoints (around 70 in total scattered across a small map)

verbal juniper
#

:MoveTo()

#

I haven't used it much but it should work

jaunty cairn
verbal juniper
jaunty cairn
#

Yes

#

Model:MoveTo(position)

verbal juniper
#

Humanoid:MoveTo

jaunty cairn
#

Oh, humanoid?

verbal juniper
#

Ye

#

Easier than pathfinding, but not better

#

As you'll have to add a bunch of checks to avoid model getting stuck

pallid gorge
#

I know about move to but like how can I generate a path out of these individual waypoints

verbal juniper
#

Make it move to one

#

Then make a function when it touches it

#

Then move to the next

pallid gorge
#

but the problem is that it's not a single linear path

#

more like a network of paths

#

seems like I'll have to make my custom pathfinding algorithm

verbal juniper
#

I cant explain pathfinding