How to calculate "collateral damage", damage outside a specific area?

I’m a software engineer by trade but I’m a real noob when it comes to UE and creating games in general so bear with me. I’m trying to figure out how to calculate the total damage caused to objects outside a specific area. Consider the following scenario…

The blue circles are civilians and the red circles terrorists. The black circle in the middle is a fountain. The black boxes on the edges are buildings. Civilians, terrorists and the buildings can take damage. I need to calculate how much damage is caused outside the green area, i.e. collateral damage. There might be projectile and/or radial damage. Doesn’t matter who causes the damage, any damage outside the green area should be accounted for.

I found that UE has a thing called Volumes and that sounded like something I could use for this but none of the Volume Types seem to be suitable.

II’m not an expert, but you can do somethink like this:

  1. Add a “Trigger Volume” (like the green one on your scheme)

  2. Add a “Counter” variable to your Character Controller

  3. When someone/something is taking damage, check whatewer it’s in the green volume, and update the counter by the damage amount… You can check it using “On Component Begin Overlap” and “On Component End Overlap” events

Thanks for the suggestion. I’ll try it out and report back.

Thought some more about your idea, but realized that if the actor is thrown outside the volume and then gets destoryed it will accumulate collateral damage instead of target damage and vice versa. In some cases your suggestion would work so I’ll mark it as an answer.

Instead I decided to make a base class for the destructibles and have an IsTarget boolean variable which I can check upon taking damage.