Behavior Tree Task-setting random waypoint for AI Character

How would one create a task to choose a random waypoint for an AI driven character to go to? Say there were a set of Target Point Objects on the Navmesh placed in the level. How would a random waypoint be chosen so that its location can be set to the Tree’s Blackboard? In coding, I would presume one would have all waypoint data in an array and choosing a random index to select a point. Is there such a feature like this in Unreal Engine? Blueprint or C++ is acceptable. I just need a push in the right direction.

The easiest way to do it would be to get have your waypoints be of a certain class and use Get All Actors of Class to get a list of all actors, and then pick one at random. Like so:

Ideally however you should use EQS :smiley:

Cheers,

–mieszko