How would I go about creating a “protocol/interface” that looks like this:
UFUNCTION(BlueprintImplementableEvent, Category = "Health")
void OnHPZero();
UFUNCTION(BlueprintImplementableEvent, Category = "Health")
void OnTakeHitFromRaycast(const FHitResult Hit);
UFUNCTION(BlueprintImplementableEvent, Category = "Health")
void OnTakeHit();
virtual void TakeHitFromRaycast(const int32 IncomingDamage, const FHitResult Hit);
virtual void TakeHit(const int32 IncomingDamage);
The important thing is, I need to be able to use this on a Pawn AND a Character.
I can’t just make a pure C++ virtual class/function because I need the blueprint pieces.
My pawn must NOT be a Character, so it should be able to implement this separately.
What I am trying to solve is code reduction - so I don’t have to copy and paste these same functions/events in multiple classes.