AActor::TakeDamage

Apply damage to this actor.

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h

Include

#include "GameFramework/Actor.h"

Source

/Engine/Source/Runtime/Engine/Private/Actor.cpp

Syntax

virtual float TakeDamage
(
    float DamageAmount,
    struct FDamageEvent const & DamageEvent,
    class AController * EventInstigator,
    AActor * DamageCauser
)

Remarks

Apply damage to this actor.

Returns

The amount of damage actually applied.

Parameters

Parameter

Description

DamageAmount

How much damage to apply

DamageEvent

Data package that fully describes the damage received.

EventInstigator

The Controller responsible for the damage.

DamageCauser

The Actor that directly caused the damage (e.g. the projectile that exploded, the rock that landed on you)

See Also