Create a BP character called BP_NPC
Select the mesh and Anim class in details
Tick Use Controller Desired Rotation in BP component detail
Also unitck rotation yaw (only useful when use player controller)
R click, Blueprint class, All class, type AI controller, select. Name as AI(Controller)_NPC
Create Behavior Tree and Blackboard, called BT_NPC and BB_NPC
In AI(Controller) NPC event graph, add
In BP NPC, Select AI(Controller) NPC in AI Controller Class
Also, change auto possess AI to Place in world or spawned
Open the Anim BP used for NPC BP (case here is manny ABP), add follow (bottom 3) nodes
Open behavior tree, set bl;ackboard asset to BB BPC
Create tree as below
Click New Task at top menu, name as MoveToRandomLocation
Change Functions Overrid to Receive Execute AI
The relevant node is created, create a graph as below (gonna execute as in BP_NPC graph, but in behavior tree here)
Create varianle Radius, tick instance editable
Also promote variable on acceptabnce radius, tick instance editable
Continue (min and max variables are renamed and tick instance editable
Back to behavoir tree, add the follow node, in default can set all variables values
set radius 5000, acceptace 100, min idle and max idle depends
Set nav bound volume and NPC character in the scene