I would like to know which way would be the easiest to make my character dealing Damage based on the enemys missing Health. I’m currently checking for the class of the hit Actor and then casting to the hit actor to get the remaining Health variable but this seems to be a very bad way to do this.
Why does it seem like a bad way?
If you want, you can handle the damage entirely from within the damaged pawn class’ Apply Damage event instead. Then you have better encapsulation and no casting. Don’t be afraid of casting, but do encapsulate whenever possible so different classes don’t have to know more than a bare minimum about each other and how the others work.