Navigation
API > API/Runtime > API/Runtime/Engine
A DamageType is intended to define and describe a particular form of damage and to provide an avenue for customizing responses to damage from various sources.
For example, a game could make a DamageType_Fire set it up to ignite the damaged actor.
DamageTypes are never instanced and should be treated as immutable data holders with static code functionality. They should never be stateful.
| Name | UDamageType |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/DamageType.h |
| Include Path | #include "GameFramework/DamageType.h" |
Syntax
UCLASS (MinimalAPI, Const, Blueprintable, BlueprintType)
class UDamageType : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UDamageType
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UDamageType
(
const FObjectInitializer& ObjectInitializer |
GameFramework/DamageType.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCausedByWorld | uint32 | True if this damagetype is caused by the world (falling off level, into lava, etc). | GameFramework/DamageType.h |
|
| bRadialDamageVelChange | uint32 | When applying radial impulses, whether to treat as impulse or velocity change. | GameFramework/DamageType.h |
|
| bScaleMomentumByMass | uint32 | True to scale imparted momentum by the receiving pawn's mass for pawns using character movement | GameFramework/DamageType.h |
|
| DamageFalloff | float | Damage fall-off for radius damage (exponent). Default 1.0=linear, 2.0=square of distance, etc. | GameFramework/DamageType.h |
|
| DamageImpulse | float | The magnitude of impulse to apply to the Actors damaged by this type. | GameFramework/DamageType.h |
|
| DestructibleDamageSpreadScale | float | How much the damage spreads on a destructible mesh | GameFramework/DamageType.h |
|
| DestructibleImpulse | float | How large the impulse should be applied to destructible meshes | GameFramework/DamageType.h |
|