From 0c688fb86a07bc4f687a9cd4cace3cf474bdf222 Mon Sep 17 00:00:00 2001 From: baz Date: Sat, 16 Nov 2024 01:35:21 +0000 Subject: [PATCH] Bind TakeDamage onto OnTakeAnyDamage --- Source/vampires/HealthComponent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/vampires/HealthComponent.cpp b/Source/vampires/HealthComponent.cpp index 7dca1a1..e916f81 100644 --- a/Source/vampires/HealthComponent.cpp +++ b/Source/vampires/HealthComponent.cpp @@ -106,4 +106,6 @@ void UHealthComponent::BeginPlay() Super::BeginPlay(); ResetHealth(); + + GetOwner()->OnTakeAnyDamage.AddUniqueDynamic(this, &UHealthComponent::TakeDamage); }