Im trying to call my delegate from c++ to blueprint but im not sure if its not being called or the bind event isnt picking it up. The server_destroyactor() gets called but not the addkill.broadcast();
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FAddKill);
public:
UPROPERTY(BlueprintAssignable)
FAddKill AddKill;
float AWestern_FpsCharacter::TakeDamage(float Damage, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, class AActor* DamageCauser)
{
// Call the base class - this will tell us how much damage to apply
const float ActualDamage = Super::TakeDamage(Damage, DamageEvent, EventInstigator, DamageCauser);
if (ActualDamage > 0.f)
{
Health -= ActualDamage;
if (Health <= 0.0f)
{
AddKill.Broadcast();
Server_DestroyActor();
}
}
return ActualDamage;
}