AActor::ReceiveAnyDamage
#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
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?