Object variable not being picked up in Blueprint
Hi all, I'm wondering if someone could perhaps help me with a problem I'm having. I've followed this tutorial through to make a bot patrol between waypoints and then attack the player when it detects that the player is within a certain radius: https://wiki.unrealengine.com/Create_An_AI_Bot_in_Blueprint Now the patrolling part works fine, however after using the useful debug tool, it appears that the problem is in the BTService Blueprint Base blueprint and that one of the object variables ('EnemyActor') in this blueprint isn't being picked up properly so the == condition isn't being met which causes the branch to always be false. I could be completely wrong as I'm new to the unreal engine. I've also attached some screenshots of the behaviour tree (only the nodes I've circled in red get activated, I think because the attack branch is activated by the BTService Blueprint Base). I've also attached a screenshot of the Blackboard that I 'think' the EnemyActor object variable is set from. Sorry if I'm not very clear - I've only just recently got into this.
Thanks all, Andy :)
Blackboards don't "set" variables they only define them (keys though, not variables although they can appear similar.) you need to set the key value in the service before you perform your comparison check. Without a better view of your BP graph and better understanding of what you need I'm not sure I can give a better answer but I hope this helps some!
See this tutorial here https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/11/index.html
Notice the first image near the right edge where he "Set Blackboard Value As Object". You need something similar depending on the key type (object, bool, vector etc)
Follow this question
Once you sign in you will be able to subscribe for any updates here