# Shooting while moving (Multiple BT Task at the same time)

**URL:** <https://forums.unrealengine.com/t/shooting-while-moving-multiple-bt-task-at-the-same-time/338638>\
**Category:** Blueprint\
**Tags:** Behavior-Tree, task, bttask, unreal-engine, Blueprint, question\
**Created:** [November 16, 2015, 10:30am UTC](https://forums.unrealengine.com/t/shooting-while-moving-multiple-bt-task-at-the-same-time/338638 "2015-11-16T10:30:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxiHori](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxiHori](https://forums.unrealengine.com/u/MaxiHori)\
**Post date:** [November 16, 2015, 10:30am UTC](https://forums.unrealengine.com/t/shooting-while-moving-multiple-bt-task-at-the-same-time/338638/1 "2015-11-16T10:30:20Z")

</div>

I need to be able to perform multiple operation at the same time (for example, choose the next spot to move and move to it while choosing the next target to shot at and shoot)

What is the proper way to implement that?

---

<div class="post-metadata">

**Author:** ![darorck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darorck](https://forums.unrealengine.com/u/darorck)\
**Post date:** [May 12, 2016, 7:30pm UTC](https://forums.unrealengine.com/t/shooting-while-moving-multiple-bt-task-at-the-same-time/338638/2 "2016-05-12T19:30:49Z")

</div>

This is quite old but as this is the first post I found looking for almost the same question, going to add a solution for future people.

I solve it adding a | Simple Parallel | node, following by a | Move To | and a Task node with a Blackboard Based Condition.  
Works perfect.

 ![90362-ai.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/e/5ee3a9217c93025a366f90455cd6eba1002c0800.jpeg)

---

<div class="post-metadata">

**Author:** ![MaxiHori](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxiHori](https://forums.unrealengine.com/u/MaxiHori)\
**Post date:** [May 13, 2016, 10:39am UTC](https://forums.unrealengine.com/t/shooting-while-moving-multiple-bt-task-at-the-same-time/338638/3 "2016-05-13T10:39:57Z")

</div>

Thanks, I ended up doing something similar but by placing the simple parallel node at the root node.

The real solution would be to have multiple roots on the same behaviour tree that runs indipendently from each other (just with shared variables)

---

<div class="post-metadata">

**Author:** ![crossmr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crossmr](https://forums.unrealengine.com/u/crossmr)\
**Post date:** [December 1, 2018, 3:21pm UTC](https://forums.unrealengine.com/t/shooting-while-moving-multiple-bt-task-at-the-same-time/338638/4 "2018-12-01T15:21:45Z")

</div>

I’ve done this and it doesn’t work for me. Maybe because I’m using a cool down decorator. My cooldown has 1 second cooldow, but what happens is that the AI executes the move to, then it attacks, and then it just never attacks again until it switches to another branch.

 ![261029-parallel.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/5/4d50dedab9380e15d86aec7cb3afe23d5b86ecb7.png)
