Not Calling my function when another actor enters the collision sphere

Hey there,

i dont know if the functionpointer OnComponentBeginOverlap is intended to be used to assign multiple callbacks to it (really not sure). But what is the problem with the following code?




void ARPGCharacter::TZ_Enter(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
	if (!OtherActor->IsA(ACharacter::StaticClass())) // Checks to see if the other actor is not a character
	{
		GEngine->AddOnScreenDebugMessage(1, 5.f, FColor::Purple, "Overlapped Some Shiz"); // Displays a debug message
	}
        
        // Simply call additional functions ?!?
        Loot_Pickup(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep, SweepResult);
}

void ARPGCharacter::Loot_Pickup(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
	if (!OtherActor->IsA(ACharacter::StaticClass()) && OtherActor->IsA(APickup::StaticClass()) )
	{
		GEngine->AddOnScreenDebugMessage(1, 5.f, FColor::Yellow, "Enterd");
		APickup* CurrentPickup = Cast<APickup>(OtherActor);
		CurrentPickup->onPickedup();
	}
}