# Trouble With AI Behavour Tree Task

**URL:** <https://forums.unrealengine.com/t/trouble-with-ai-behavour-tree-task/442155>\
**Category:** AI\
**Tags:** Behavior-Tree, task, unreal-engine, Blueprint, question\
**Created:** [January 27, 2019, 11:16am UTC](https://forums.unrealengine.com/t/trouble-with-ai-behavour-tree-task/442155 "2019-01-27T11:16:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrNoobiePants](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrNoobiePants](https://forums.unrealengine.com/u/MrNoobiePants)\
**Post date:** [January 27, 2019, 11:16am UTC](https://forums.unrealengine.com/t/trouble-with-ai-behavour-tree-task/442155/1 "2019-01-27T11:16:22Z")

</div>

I am currently working on an AI Behaviour Tree and currently stuck on a Task I created.  
I want the AI to find an objective Move towards it and attack it, if the Ai destroys the objective  
I want it to do a distance check and find the closest objective and repeat the action.

- I have a conditional Loop attached to the sequence that exits when all the objectives have been destroyed.  
-The task i created is highly inconsitant one time it works then the other it fails

Here are some screen shots and a link to the Task Blueprint  
Any help with making this efficient will be highly appriciated

> **[AI Behavior Task \[INCONSISTENT\] posted by anonymous | blueprintUE | PasteBin...](https://blueprintue.com/blueprint/aed186fh/)**
>
> No description provided

---

<div class="post-metadata">

**Author:** ![MrNoobiePants](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrNoobiePants](https://forums.unrealengine.com/u/MrNoobiePants)\
**Post date:** [January 27, 2019, 11:17am UTC](https://forums.unrealengine.com/t/trouble-with-ai-behavour-tree-task/442155/2 "2019-01-27T11:17:17Z")

</div>

![266645-01.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/5/e/f5ee3c613f2058954953dec27424016d2cd75304.jpeg)
