# I want my weapon to deal damge to A.I

**URL:** <https://forums.unrealengine.com/t/i-want-my-weapon-to-deal-damge-to-a-i/2211807>\
**Category:** Blueprint\
**Tags:** unreal-engine, need-help, Blueprint\
**Created:** [December 12, 2024, 1:13pm UTC](https://forums.unrealengine.com/t/i-want-my-weapon-to-deal-damge-to-a-i/2211807 "2024-12-12T13:13:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atomicwolf893](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atomicwolf893](https://forums.unrealengine.com/u/Atomicwolf893)\
**Post date:** [December 12, 2024, 1:13pm UTC](https://forums.unrealengine.com/t/i-want-my-weapon-to-deal-damge-to-a-i/2211807/1 "2024-12-12T13:13:24Z")

</div>

![Screenshot 2024-12-12 130933](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/3/37367afef7593cf15a2ae74d78582e87e55a7bc1.png)  
With this I am trying to get my weapon to deal damge to the A.I and I have no idea on what to put next within the code as I am still brand new to blueprint.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 12, 2024, 1:36pm UTC](https://forums.unrealengine.com/t/i-want-my-weapon-to-deal-damge-to-a-i/2211807/2 "2024-12-12T13:36:16Z")

</div>

- ensure the green float variable has a value you need - that’s the max distance in centimetres
- you’re tracing on the `Visibility` channel, ensure the enemy’s capsule component blocks that channel - check its collision settings
- implement this event in the enemy:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/4/4043decc7597a44b833c5fbbc3eaed514a014abc.png)

* * *

If it does not work, `Print String` `Display Name` of the `Hit Actor` from the trace and tell us what it says.

---

<div class="post-metadata">

**Author:** ![Atomicwolf893](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Atomicwolf893](https://forums.unrealengine.com/u/Atomicwolf893)\
**Post date:** [December 12, 2024, 2:12pm UTC](https://forums.unrealengine.com/t/i-want-my-weapon-to-deal-damge-to-a-i/2211807/3 "2024-12-12T14:12:38Z")

</div>

Thanks this hleps me out a lot.
