# cant deal damage to enemy

**URL:** <https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205>\
**Category:** Community & Industry Discussion\
**Tags:** damage, unreal-engine, enemy, shooter, question\
**Created:** [April 1, 2021, 10:40am UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205 "2021-04-01T10:40:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 10:40am UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/1 "2021-04-01T10:40:41Z")

</div>

Hi

I am trying to deal damage to my enemy in a third person mode, so I am using a custom projectile. I created a blueprint using apply damage and print string to check if its firing and it not and Im not sure why. Please can anyone help

---

<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:** [April 1, 2021, 10:47am UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/2 "2021-04-01T10:47:47Z")

</div>

You’ve shown absolutely no details so it’s pretty much impossible to help you other than:

## Projectile

 ![334301-proj.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/0/790c33c5e90173f0a9fac5f4eb9835a1b4e01dfb.png)

## Enemy

 ![334302-screenshot-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/c/9dcd394441a63aab2c1f6315b4e10724b2e02aad.png)

* * *

If you need more help, you’ll need to include details.

---

<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:** [April 1, 2021, 10:49am UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/3 "2021-04-01T10:49:26Z")

</div>

> so I am using a custom projectile

For example, how can we guess how you set it up, spawn, control and detect its collision.

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 12:15pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/4 "2021-04-01T12:15:54Z")

</div>

![334309-a77b9d4b-16e7-425c-8d82-d74d7b9b6503-4-5005-c.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/6/e56500007a4268cefab07e15a4dbb96c5e53353c.jpeg)

This is my blueprint for the bullet spawning and for the bullet applying damage

 ![334310-99e5ac92-8a17-4dc0-821c-e20f5fb40588-4-5005-c.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/f/cff61cba7c0bea3b95bbad673dcb9ac09b4f56af.jpeg)

---

<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:** [April 1, 2021, 12:21pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/5 "2021-04-01T12:21:07Z")

</div>

So what is _Target_? How does the Bullet know about Target? Conversely, what is Damage Causer - how are you setting / propagating the reference?

* * *

Why not use `Other Actor` of the _onComponentHit(Bullet)_ node? Because that’s the actor you’re hitting.

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 12:30pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/6 "2021-04-01T12:30:41Z")

</div>

target is a object reference to the enemy and damage causer is a object reference to the player. I hasve tried it with the reference to other actor instead and it still doesnt work. I also ahev this blueprint in the enemy graph.

 ![334312-f43eec50-0680-465d-8689-f99c225f8242-4-5005-c.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/0/d005babf645dd944200f15f151463cc53faad116.jpeg)

---

<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:** [April 1, 2021, 12:46pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/7 "2021-04-01T12:46:05Z")

</div>

> target is a object reference to the  
> enemy and damage causer is a object  
> reference to the player.

Sorry, but this helps very little. You did not really answer the question:

- how are you _setting_ Target reference, we can’t see it. Creating a variable does nothing, you need to point at a value. You’re applying damage to some target actor - how does the bullet know which target you’re hitting. Can you explain?

And now we have another mysterious function:

- how are you calling _DoDamage_? We can’t see it anywhere.

Where is the Damage interface event in the target. Since you’re **Applying** damage, how is the target **Receiving** it - equivalent of _Event AnyDamage_ in my example. And why not just use that? Or you’re using it but it’s not working - there are too many unknowns here.

* * *

Dealing damage is literally about those 3 nodes I posted initially. If you cannot get what I posted to work, you’ll need to explain how you’ve set up collision between the _Target_ and the _Projectile_ actor / _Bullet_ mesh.

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 12:54pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/8 "2021-04-01T12:54:00Z")

</div>

terribly sorry im a kind of new at this. IS there anyway you could show me from the beginning of making a projectile colide and all the bits that go with it

---

<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:** [April 1, 2021, 12:56pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/9 "2021-04-01T12:56:23Z")

</div>

No worries. Can you try replicating the initial setup I posted, just for now - you can later on plug in your functions for calculating damage and so on.

Those 3 nodes. Do tell if it prints.

---

<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:** [April 1, 2021, 1:09pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/10 "2021-04-01T13:09:41Z")

</div>

So here it is from scratch in 3rd person template:

## bullet

 ![334313-bullet.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/3/543845903be2ba2445a4ca53c14c63fbad1a8d30.png)

 ![334334-screenshot-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/4/9348c19bde91b3f0b702688ae3e629d9176bcdcb.png)

## Spawning bullets and receiving damage:

 ![334314-thirdspawnbullet.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/c/47c7b355d1b66a235f98b28af7676f802c716d85.png)

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/b/03b36befebdf1ab817817d9540265e3b117b8c76.gif)](https://gyazo.com/66ad8900f058fad622eb95a84b492344)

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 1:19pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/11 "2021-04-01T13:19:28Z")

</div>

I have replicated the setup you have posted with the exception of the other comp node i dont where that is plugged into. Also its not printing anything currently.

---

<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:** [April 1, 2021, 1:30pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/12 "2021-04-01T13:30:37Z")

</div>

> where that is plugged

It’s just the rest of the first person template. See below for the whole thing.

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 1:35pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/13 "2021-04-01T13:35:05Z")

</div>

my projectile isnt bouncing off the enemy its is just disappearing. and nothing is printing

---

<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:** [April 1, 2021, 1:37pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/14 "2021-04-01T13:37:09Z")

</div>

Could show the hierarchy of that actor? Sounds like you’re missing collision or using an overlap. As above:

 ![334316-screenshot-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/6/f964d86da3f03ddbd4ee5af843dafc0af48ce239.png)

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 1:41pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/15 "2021-04-01T13:41:30Z")

</div>

![334320-10d60b83-92a6-4f80-8584-7238ea04afc9-4-5005-c.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/3/5339ad59b20ce6e16cc6b35a262fbd779f14d12c.jpeg)

is this what you need to look at?

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 1:42pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/16 "2021-04-01T13:42:02Z")

</div>

![334341-59609aa1-d7b9-4a1d-b695-4455a383cbdb.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/c/bdcfb433523ed3cb0e0117064581d7134bd927d8.jpeg)

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 1:42pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/17 "2021-04-01T13:42:17Z")

</div>

![334342-769d3c6b-f1a9-486a-aac1-5310661abcf4.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/2/f42bd9bb8453d290df42eda637644a3387313c9d.jpeg)

---

<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:** [April 1, 2021, 1:46pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/18 "2021-04-01T13:46:56Z")

</div>

You have it reverse. Drag the sphere on the _Default Scene Root_ and parent the mesh to the sphere. Projectile Movement Component only cares about the component that the root.

---

<div class="post-metadata">

**Author:** ![ChazAttack](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChazAttack](https://forums.unrealengine.com/u/ChazAttack)\
**Post date:** [April 1, 2021, 1:57pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/19 "2021-04-01T13:57:26Z")

</div>

so make a new root of the sphere or just atatch it to the scene root

---

<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:** [April 1, 2021, 1:59pm UTC](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205/20 "2021-04-01T13:59:42Z")

</div>

Make sphere collision the root:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/f/1bfd1f62eff282e41f732c5c767fd001693abdd1.gif)](https://gyazo.com/3a2989964350a717d7f58371be170742)

[Next page](https://forums.unrealengine.com/t/cant-deal-damage-to-enemy/481205.md?page=2)
