Need help with the behavior tree task "Run EQS Query"

I have a sequence node with a “Run EQS Query” (custom one to find the closest object of a certain type) followed by a second custom node to process the result. Sometimes the second node never gets called, so I imagine the Run EQS task returned a failure. A value does get stored in the blackboard key I specified in the Run EQS node, but the second node doesn’t run, sometimes. Perhaps the task found a match in a preliminary step but failed one of the remaining conditions? I’d imagine that if any condition fails that the blackboard key would not be set, but that doesn’t seem to be the case.

Ultimately, whether the EQS query succeeds or fails, I need to call a task to process the result. How do I do that? If I have a sequence, a failed result never reaches the second node and if I have a selector node then a success result never reaches the second node. How do I check the result of the EQS whether it fails or succeeds in a behavior tree?

The only thing I can think of is not using the EQS task and instead create a blueprint task to do both finding the object, and processing it.

So here’s my own answer (for when I forget how I fixed it and come looking in the answerhub). Here’s a reference image:


. I run the query and then try to process the result in another node. Even though the processing node doesn’t get called when the query fails, the blackboard value (TargetToFollowR) does get set to something (I imagine it’s used as a temp when iterating through nodes). This was unexpected to me. On other parts of the behavior tree (not shown), I checked if I had a valid target by checking if ‘TargetToFollowR’ had been set, but it wasn’t working because that blackboard value is set whether the EQS query fails or succeeds. So to solve the problem, I simply used a different temporary blackboard value (queryTemp) on the query node and in the processQueryResult I apply it to the real value. That way the real value only gets set if there was a valid result from the query. Hope I understand this explanation when I read it again in six months.