I have a problem where I need actor component to start action inside of the actor that it is part of the component. Lets say that I have actor component for HP system that every time the actor gets hit, it will remove set amount of damage from the actor. Inside of the HP system BP there is logic for calculating resistances to different elemental damages, and so on. But when the actor HP reaches 0, I want to call custom Death event that has details inside of the Actor blueprint because I want each enemy to do something different on death for example.
How do I do that?
When I try making custom event in the HP system component, I have to use that even inside of that blueprint.
I can make custom event inside of the Actor BP and then just cast the Actor to get that custom event, but the problem is that it works only on one specific Actor type, so if I wanted to add multiple enemies into my game, I would either have to make each one of them their own unique HP system actor components, or I would have to cast every single enemy type in the game every time enemy dies, at which point it would be easier to just put all the HP system logic into each enemy BP.
Is there a way to just make an event that triggers the Flow from the Actor component into the Actor the component is part of?