Apply Damage

On Unreal Engine 5.3 i 'm trying to make the player receive damage from the Enemy AI but somehow it won’t work.

This is for the player to receive damage



This is for the enemy to give damage to the player

I’ve created a notify inside the Enemy attack animation and when the animation comes to the notify part (which is when the Enemy will hit the player) it will deal damage to the player.

Now when i test this, go in front of the Enemy and let him attack me, nothing happens. The Player Healthbar won’t go down nor the player will play the hit reaction animations, but if i make the player be damaged when i press a keyboard button instead, it will work.

Can someone help, please?

lots going on here, two places to start

  1. I cant see where you get the location for SphereOverlapActors. Maybe put a breakpoint/printstring to see what, if anything it hits.
  2. make sure your notify actually triggers, same thing. breakpoint or printstring

Hey, the last screenshot shows that your character “Event AnyDamage” runs normal so the problem should be enemy logic. Here is what you should do:

  • Add breakpoint at “For Each Loop” in enemy blueprint.
  • Then check the “Out Actors” array size to make sure your character is included.

If it is not, you should check out your sphere overlap.


Server Only

heyo! Sorry for the late reply, i’ve been pretty busy…
How should i check the array size? I’ve insert “pawn” in the array, and also yea probably there’s something wrong with the sphere but i can’t really tell what because i’m a beginner and still learning this all

makes no sense because as i’ve said if i press a button the player will receive the damage from apply damage function

the location is “world location” and the target is “attack sphere” (variable type:sphere collision).
I didn’t understood where to put the breakpoint/print string for the notify, can you send a screenshot please?

the world location of what?

you can put a print string on the worldlocation, this tells you 2 things, is the location correct and does the event even fire

Okay, so deal damage is an event that will be executed when the notify begins, i just checked right now with a breakpoint on the “deal damage” and the game doesn’t stop sp this means there’s a problem with the notify, what that might be?

Hey, how things going on? You should place your mouse on “OutActors” and you will know the size of “Out Actors” array like this:


If array size is zero, check out your sphere.

Did you do it like this? If so, your animation may not be played at the position of notification or you can add “print hello” following the AnimNofity_.