unreal.DamageType

class unreal.DamageType(outer=None, name='None')

Bases: unreal.Object

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.

C++ Source:

  • Module: Engine

  • File: DamageType.h

Editor Properties: (see get_editor_property/set_editor_property)

  • caused_by_world (bool): [Read-Write] True if this damagetype is caused by the world (falling off level, into lava, etc).

  • damage_falloff (float): [Read-Write] Damage fall-off for radius damage (exponent). Default 1.0=linear, 2.0=square of distance, etc.

  • damage_impulse (float): [Read-Write] The magnitude of impulse to apply to the Actors damaged by this type.

  • destructible_damage_spread_scale (float): [Read-Write] How much the damage spreads on a destructible mesh

  • destructible_impulse (float): [Read-Write] How large the impulse should be applied to destructible meshes

  • radial_damage_vel_change (bool): [Read-Write] When applying radial impulses, whether to treat as impulse or velocity change.

  • scale_momentum_by_mass (bool): [Read-Write] True to scale imparted momentum by the receiving pawn’s mass for pawns using character movement

property caused_by_world

[Read-Only] True if this damagetype is caused by the world (falling off level, into lava, etc).

Type

(bool)

property damage_falloff

[Read-Only] Damage fall-off for radius damage (exponent). Default 1.0=linear, 2.0=square of distance, etc.

Type

(float)

property damage_impulse

[Read-Only] The magnitude of impulse to apply to the Actors damaged by this type.

Type

(float)

property destructible_damage_spread_scale

[Read-Only] How much the damage spreads on a destructible mesh

Type

(float)

property destructible_impulse

[Read-Only] How large the impulse should be applied to destructible meshes

Type

(float)

property radial_damage_vel_change

[Read-Only] When applying radial impulses, whether to treat as impulse or velocity change.

Type

(bool)

property scale_momentum_by_mass

[Read-Only] True to scale imparted momentum by the receiving pawn’s mass for pawns using character movement

Type

(bool)