UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"script to create player picking up health"
void AHealthPickup::NotifyActorBeginOverlap(AActor* OtherActor) { Super::NotifyActorBeginOverlap(OtherActor); if (OtherActor->IsA(APlayerCharacter::StaticClass())) { APlayerCharacter* PlayerCharacter = Cast<APlayerCharacter>(OtherActor); PlayerCharacter->Heal(HealthAmount); Destroy(); } }