I’m going to try to give you a clear visualization here; imagine a maze with one entrance and one exit, with multiple paths that lead to the exit. There are 2 NPCs (let’s call them “A1” and “A2”) at the entrance and their goal is to get to the exit (from now on we’ll call the exit “B”). However, I don’t want A1 and A2 to just find the quickest path to B and both take that path. I want them to choose randomly between possible paths within the maze, so that they don’t take the same path every time. And every time I reset A1 and A2 back at the entrance of the maze, they will take a different path from the last time to get to B.
Now of course I don’t want this pathfinding to be completely random, as that would be chaos. They should probably be able to choose 3 or 4 of the most efficient paths to B and then randomize from there
I just did something kinda similar and I’ll tell you what I did. I had 3 NPCs and I had them trying to go at 3 different doors. To ‘attack’ the player.What I did (which works in my case) is make a bunch of part waypoints, and inside those a bunch of object values (To give each way point each choice of where to go next). I then Used math.random to pick one of these possible directions to the next part, and or/ the door. (I made it impossible for the npc to go backwards to where it came from)
Below is a picture of what I did (It that helps at all lol):
Basically give it a bunch of choices on where it can go. I had 3 exits and 2 starts, but you could do this with something like a 1 exit 1 start situation maybe? I hope this is helpful to you. But let me know if you have questions
Edit: I really had these points, but used pathfinding for the walking inbetween each part.
I can. Just give me a minute (Hopefully discord media link works for you as It will probably be bigger then the max limit) But I will warn you that my NPCs have personalities, In my case. Some like hallways more, some like being in rooms more. They also in my case wait at each point, but then again if you were to do something like this you can skip that wait time
(My system is a lot more complex Because this is more set up in the Style of Fnaf with a device to track where the monsters are etc., which is why there is a wait times, personalities etc.)