Behavior Tree quick start problem

Hi!

I was reading Behavior Tree quick start… When I finished it, I tested it, but found, that CloseEnough Method don’t work: I got an error: Error Accessed None ‘CallFunc_GetBlackboardValueAsActor_ReturnValue’ from node Print String in graph ‘PerformConditionCheck’ in blueprint CloseEnough

I tried to check it using Print Screen, but still, I didn’t found the error…

What could be the problem? I made everything (or most everything) just like it was written in the Quick Start

with best regards,

RealCoder

I haven’t seen the quick start Guide so I don’t know the setup, however it seems that your blackboard entry for the actor is empty. There should be a blueprint service running somewhere in the tree, one should have a function to update the blackboard value - sounds like this isn’t happening for some reason.

An example:
You have a service running, let’s call it CheckAgroRadius, to run a ray trace for enemies within a certain radius. If the trace returns a hit, take the actor it hit and connect it to the target “set blackboard value as actor” with your appropriate key set.

If you have something like this, make sure that

  • the variable for your key inside your service is flagged as global

  • you’ve assigned the key from your service to the appropriate key in your blackboard (done in the settings for your service in behavior tree view)

Apologies for the lack of screen shots as I’m currently on mobile.

Thanks for response!

Yes, I have such service, which was fully copied from the quick start:

https://docs.unrealengine.com/latest/images/Engine/AI/BehaviorTrees/QuickStart/11/fullGraph.png

I think, that the problem is that at the end of the event graph, if the branch go to False, we set nothing in “Set Blackboard value as object”. If it is so, then how to fix it?

Sorry for the slow response. I just had a quick whizz over the guide and there’s a service called agrocheck running at the top of the tree that should set the follow target should it have one. Also, the branch that your getting the error from has a decorator condition that should only execute this branch if the follow target is actually set. If your setup is right you should never be able to receive this error assuming the blackboard key is empty since this branch shouldn’t execute. Can you post a screen shot of your behavior tree?

Just ran into this as well, and the problem was that the decorators were in the wrong order. Make sure you add the blackboard decorator first, followed by the CloseEnough decorator. As boyty01 mentioned, the blackboard decorator should stop the CloseEnough from running at all if TargetToFollow is not defined.

I know it isn’t exactly the answer you’re looking for, but would it help to use the behavior tree and blackboard from the shooter demo to break it down?

My BT

Im getting the exact error and My CloseEnough behavior decorator says UnknownDecorator. I have checked and rechecked the graph and found one problem that I can not figure out.

I am getting the error despite having the decorators in the right order:

Perhaps, we can ask Epic about this…

Getting the exact same problem.