In ninja AI folder, R click, Artificial Intelligence → create both Behavoir tree and Blackboard , name as Ninja_BT and
R click, Blueprint class, All class, type AI controller, select. Name as Ninja_AIController
go to ninja BP, select BP self, change AI controller class to ninja_AIController
Open ninja AIController, event graph
delete event trick and create nodes as follow:
Open Ninja_BT, go to blackboard (top right corner)
+NewKey → Vector, name as TargetLocation
Back to ninja BT, click New Task, name as FindRandomLocation
In the FindRandomLocation BP class, add variable, name as Vector and change type to blackboard key selector
make public accessible by turn on the eye in variable column
Create nodes as folow (RE: radius set as 1000, tick success)
(This AI BP below is to replace ninja BP event trick nodes set before, which can be deleted now)
Open Behavoir Tree, make as follow:
For Move to tab, set blackboard key as Targetlocation,
Wait tab change to 2 sec,
FindRandomlocation tab should see vector as selfactor, if no, should be some BP not yet complie; then change the vector to Targetlocation