RealDocs

AActor::ReceiveAnyDamage

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: protected Specifiers: UFUNCTIONBlueprintImplementableEventBlueprintAuthorityOnly

Description

Blueprint implementable event called on the server whenever this actor takes any damage. Override in Blueprint to respond without needing to bind the OnTakeAnyDamage delegate.

Caveats & Gotchas

  • Marked BlueprintAuthorityOnly — this event will not fire on clients. Any client-side reactions (animations, sound, VFX) must be driven through replication separately.
  • This is a BlueprintImplementableEvent with no C++ base implementation. To add C++ logic, override TakeDamage instead, not this function.

Signature

ENGINE_API void ReceiveAnyDamage(float Damage, const class UDamageType* DamageType, class AController* InstigatedBy, AActor* DamageCauser)

Parameters

Name Type Description Default
Damage float The amount of damage applied.
DamageType const UDamageType* Class describing the type of damage.
InstigatedBy AController* The controller that instigated the damage.
DamageCauser AActor* The actor that directly caused the damage (e.g. a projectile).

Return Type

void

Example

Override AnyDamage in Blueprint to deduct health and destroy when dead Blueprint
Event AnyDamage Damage Damage Type Instigated By Instigated By Damage Causer Damage Causer Health Health Health Branch Condition Condition True False Destroy Actor Target is Actor Health Health float - float float <= float 0.0
Edit Blueprint graph Override AnyDamage in Blueprint to deduct health and destroy when dead
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.