How to make character move to a random point in is patrol path?

Hello everyone.
Been trying to create a more complex path finding for an NPC. Basically I have 3 points (Let’s call them A,B,C) and I want my NPC to move randomly between them. So far I could only make it go from A-> B → C, but instead I want it to pick a random value of the Array and move to that point. I’m a little bit stuck on this. Can someone help me please?
(Find Point that we currently at and move to it)


(goes to the next point in the array)

1 Like

Have you tried to use a “random” from the path points array?

I triedto apply Random Array Item on 2 different places:
On the first print, after Get Blackboard Value as Int to plug it into to the Get;
On the second print, after getting the Lenght of the array;
Both with no success.
Am I putting it in the wrong place or using the wrong method?

You can use the Shuffle Node to Set a random order in your path points Array before you pull information From it.

Hi. Not sure how to do that because the shuffle only receives the array, how do I connect with the rest? Can you help please?

I know it seems backwards the way the node looks but pretty much it gets all the information in that array shuffles it then and puts it back so there is not really a output

Here is a video that shows how it works

1 Like

Thank you so much! it works perfectly! I just had to add to the Blueprint where it finds the points and put it between the pathpoints array and get a Copy!
Thank you again for your time and help!

1 Like