How to apply damage

Hi,

I want to apply damage to a player. I have a projectile (C++ code) where I call this:

UGameplayStatics::ApplyRadialDamage(GetWorld(), 100, GetActorLocation(), 500.0, UGrenadeDamageType::StaticClass(), TArray<AActor*>());

UGrenadeDamageType is just a class inherited from UDamageType and contains nothing (just GENERATED_BODY()).

Now I try to get the damage. I have a Player with the AnyDamage event that is calling PrintText. In theory my ApplyRadialDamage should fire the event and show a text on screen. But nothing happens.

I searched for solutions and tried things like call Parent:AnyDamage, enabling GenerateHitEvents, overlapping events, setting collision visibility to block… But still no message.

Can you help me?

I have no idea what solved the problem but now it works. I added some optional parameters (DamageCause, InstigatedByController), maybe that was the cause…