Hello Everyone,
I am trying to attribute some actions to an actor which is receiving damage, but the damage is applied from my c++ character’s class and it’s not triggering in the Blueprint. I’m very sure the actor which i’m calling the TakeDamage is the correct, as i’ve put the name on the screen. What is going wrong with my implementation?
c++ ------------------------------------------------
void APlatformXP1Character::Attack()
{
if (TargetActor)
{
GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Red, TargetActor->GetName());
FRadialDamageEvent RadialDamageEvent;
RadialDamageEvent.Origin = TargetActor->GetActorLocation();
RadialDamageEvent.Params.BaseDamage = 100.f;
RadialDamageEvent.Params.DamageFalloff = 50.f;
RadialDamageEvent.Params.MinimumDamage = 50.f;
GEngine->AddOnScreenDebugMessage(-1, 2.f, FColor::Blue, TEXT("Attack"));
TargetActor->TakeDamage(100.f, RadialDamageEvent, GetController(), this);
}
}
Blueprint from TargetActor:
Thanks.