# Only one Enemy Ai attacks

**URL:** <https://forums.unrealengine.com/t/only-one-enemy-ai-attacks/822325>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [March 25, 2023, 6:53pm UTC](https://forums.unrealengine.com/t/only-one-enemy-ai-attacks/822325 "2023-03-25T18:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TLOA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tloa/32/634422_2.png) [@TLOA](https://forums.unrealengine.com/u/TLOA)\
**Post date:** [March 25, 2023, 6:53pm UTC](https://forums.unrealengine.com/t/only-one-enemy-ai-attacks/822325/1 "2023-03-25T18:53:43Z")

</div>

I have a parent enemy with an AI controller, Blackboard, and behavior tree. on the parent and all of the children, only one enemy attacks. if i kill the attacking enemy, another one will start to attack. i would like all enemies to attack. any feeback?

 ![Screenshot 2023-03-25 145321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/c/2bc19b8a8c0ee3ef5cbc16deac825236503c86cf.png)

---

<div class="post-metadata">

**Author:** ![TLOA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tloa/32/634422_2.png) [@TLOA](https://forums.unrealengine.com/u/TLOA)\
**Post date:** [March 28, 2023, 12:47am UTC](https://forums.unrealengine.com/t/only-one-enemy-ai-attacks/822325/2 "2023-03-28T00:47:41Z")

</div>

Solved by setting enemy as variable in the AI controller and attaching it to the attack event.

 ![Screenshot_20230327_000443_Chrome](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/c/5fca0747b482b0c44a79d9dcf1fd18463382d604.jpeg)
