FDamageEvent

Event used by [AActor::TakeDamage](API\Runtime\Engine\GameFramework\AActor\TakeDamage) and related functions

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/EngineTypes.h

Include

#include "Engine/EngineTypes.h"

Syntax

struct FDamageEvent

Remarks

Event used by AActor::TakeDamage and related functions

Variables

Name Description

Public variable

TSubclassOf< cl...

 

DamageTypeClass

Optional DamageType for this event.

Constructors

Name Description

Public function

FDamageEvent()

Default constructor (no initialization).

Public function

FDamageEvent

(
    FDamageEvent const& InDamageEvent
)

Public function

FDamageEvent

(
    TSubclassOf< class UDamageType > In...
)

Destructors

Name Description

Public function Virtual

~FDamageEvent()

Functions

Name Description

Public function Virtual Const

void

 

GetBestHitInfo

(
    AActor const* HitActor,
    AActor const* HitInstigator,
    FHitResult& OutHitInfo,
    FVector& OutImpulseDir
)

This is for compatibility with old-style functions which want a unified set of hit data regardless of type of hit.

Public function Virtual Const

int32

 

GetTypeID()

Public function Virtual Const

bool

 

IsOfType

(
    int32 InID
)

Constants

Name

Description

ClassID

ID for this class. NOTE this must be unique for all damage events.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback