Download

Behaviour Tree Quick Start Guide - AI not patrolling [SOLVED]

I’ve finished the Behaviour Tree Quick Start Guide (https://docs.unrealengine.com/en-US/…art/index.html) on Unreal’s site and the AI chases the player as expected, however when AI has no target and should be patrolling, he just stands in place. The Print String of the Patrol Location which is being set to a vector is showing a very strange value (Set Blackboard Value as Vector). I have attached screenshots which show the Actor Location, the Random Vector Location and the Patrol Location. BTT Blueprint is also attached. Any help would be appreciated.

Additionally, I did a Udemy course and the AI in the course was scripted, no behavior trees used at all, some Marketplace content for AI also doesn’t use Behavior trees, is pure BP scripting for AI better than Trees or vice versa?

da4be874f550f10e9f9a34e659cc8d2f32353f17.jpeg

https://forums.unrealengine.com/core/image/gif;base64

1d7a2937bae7d9918112cb6833e79b86400c61ab.jpeg

SOLVED: I found this thread: https://forums.unrealengine.com/deve…blackboard-key

Thanks to Kilrogg_ for the solution.

Basically there is a drop down in the Behavior Tree next to ‘Blackboard Key’ this drop down MUST reference the correct variable from the Behaviour Tree Task. In my case the variable was not set to instance editable (the little eye next to the variable name), so there was no option in the drop down.
Hope that makes sense.

4 Likes