I want some more values for my TakeDamage()
function and I’ve read that you should be able to derive from FDamageEvent
and add anything you need, but I haven’t found any examples of this and when I tried to implement it myself it yelled at me, because of course, the TakeDamage()
function doesn’t take my new FSomeDamageEvent
struct as a parameter when overriding.
And I couldn’t cast from FDamageEvent
to my new struct, either.
USTRUCT(BlueprintType)
struct Some_API FSomeDamageEvent : public FDamageEvent
{
GENERATED_USTRUCT_BODY()
public:
UPROPERTY()
int someVar;
};
I suppose you could pass values through damage types, but that feels a bit hacky.