Getting a specific Actor out of a BP Class?

Hey,
I wanted to do something as simple as reflecting Damage to the Damage causer. I am currently making this by linking the “Damage Causer” Pin from the “Event Anydamage” to “Cast To Actor”. With doing this I get the Damage Causer ActorLocation to spawn another Actor inflicting the Damage but this would allow other actors to be damaged as well if they stand near each this Location. Is there a different way of doing this? I guess it is very simple, but I never tried something like this before.
Greetings
Miwa

Couple of ways come to mind:

  1. Instead of Applying Damage right away, you could check whether the Reflection effect is on, and then just have the Apply Damage be called once, on the pawn it’s being reflected back to.
  2. OR, the Reflection effect damager actor can, when spawned, have a variable set ReflectDamageToActor and set that variable to the only actor who should get damage, and have it Apply Damage to that one. You’ll know who to set ReflectDamageToActor to, because it will be the original damage causer.

below is an example that could work for you. here anytime damage is applied to the character it first checks to see if it should reflect the damage, if true then it simply applies damage to the damage causer. this setup may require a bit of tweaking for grenades for instance since you dont want the damage to reflect to the grenade but rather to the person that threw it. so using the instigator may be a better choice depending on the situation.