The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:UTDamageType (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> DamageType >> UTDamageType
Package: 
UTGame
Direct subclasses:
UTDmgType_Burning, UTDmgType_CicadaLaser, UTDmgType_Drowned, UTDmgType_Encroached, UTDmgType_Instagib, UTDmgType_LinkBeam, UTDmgType_LinkPlasma, UTDmgType_MantaBolt, UTDmgType_RanOver, UTDmgType_ScorpionBlade, UTDmgType_ScorpionGlob, UTDmgType_ShockBall, UTDmgType_ShockCombo, UTDmgType_ShockPrimary, UTDmgType_SpaceDeath, UTDmgType_Telefrag, UTDmgType_VehicleCollision
This class in other games:
UT3

UTDamageType

NOTE: we can not do: HideDropDown on this class as we need to be able to use it in SeqEvent_TakeDamage for objects taking damage from any UTDamageType!

Properties

Property group 'DeathAnim'

bAnimateHipsForDeathAnim

Type: bool

If true, char is stopped and root bone is animated using a bone spring for this type of death.

Default value: True

DeathAnim

Type: name

Name of animation to play upon death.

DeathAnimRate

Type: float

How fast to play the death animation

Default value: 1.0

MotorDecayTime

Type: float

If non-zero, motor strength is ramped down over this time (in seconds)

StopAnimAfterDamageInterval

Type: float

If non-zero, stop death anim after this time (in seconds) after stopping taking damage of this type.

Property group 'UTDamageType'

bUseDamageBasedDeathEffects

Type: bool

This will delegate to the death effects to the damage type. This allows us to have specific

damage effects without polluting the Pawn / Weapon class with checking for the damage type

Internal variables

See UTDamageType internal variables.

Default values

Property Value
bCausesFracture True
DamagedFFWaveform ForceFeedbackWaveform'UTGame.Default__UTDamageType:ForceFeedbackWaveform0'
KilledFFWaveform ForceFeedbackWaveform'UTGame.Default__UTDamageType:ForceFeedbackWaveform1'
RadialDamageImpulse 750.0

Static functions

BoneBreaker

static function BoneBreaker (UTPawn ThePawn, SkeletalMeshComponent TheMesh, Object.Vector Impulse, Object.Vector HitLocation, name BoneName)

This will look in the NumBonesToPossiblyBreak and choose a bone to break from that list.

CalcDeathCamera

simulated static function CalcDeathCamera (UTPawn P, float DeltaTime, out Object.Vector CameraLocation, out Object.Rotator CameraRotation, out float CameraFOV)

called when a dead pawn viewed by a player was killed by a DamageType with bSpecialDeathCamera set to true

CreateDeathGoreChunks

static function CreateDeathGoreChunks (UTPawn ThePawn, class<UTDamageTypeTheDamageType, const out Actor.TraceHitInfo HitInfo, Object.Vector HitLocation)

This will create the gore chunks from a special death

Note: temp here until we get real chunks and know the set of death types we are going to have

CreateDeathSkeleton

static function CreateDeathSkeleton (UTPawn ThePawn, class<UTDamageTypeTheDamageType, const out Actor.TraceHitInfo HitInfo, Object.Vector HitLocation)

This will create a skeleton (white boney skeleton) on death.

Currently it doesn't play any Player Death effects as we don't have them yet.

DoCustomDamageEffects

static function DoCustomDamageEffects (UTPawn ThePawn, class<UTDamageTypeTheDamageType, const out Actor.TraceHitInfo HitInfo, Object.Vector HitLocation)


DrawKillIcon

simulated static function DrawKillIcon (Canvas Canvas, float ScreenX, float ScreenY, float HUDScaleX, float HUDScaleY)


GetDeathCameraEffectInstigator

simulated static function class<UTEmitCameraEffectGetDeathCameraEffectInstigator (UTPawn UTP)

Return the DeathCameraEffect that will be played on the instigator that was caused by this damagetype and the Pawn type (e.g. robot)

GetDeathCameraEffectVictim

simulated static function class<UTEmitCameraEffectGetDeathCameraEffectVictim (UTPawn UTP)

Return the DeathCameraEffect that will be played on the victim that was caused by this damagetype and the Pawn type (e.g. robot)

GetHitEffectDuration

static function float GetHitEffectDuration (Pawn P, float Damage)

Returns:

duration of hit effect, primarily used for replication timeout to avoid replicating out of date hits to clients when pawns become relevant

GetStatsName

static function name GetStatsName (name StatType)


IncrementDeaths

static function IncrementDeaths (UTPlayerReplicationInfo KilledPRI)


IncrementKills

static function int IncrementKills (UTPlayerReplicationInfo KillerPRI)


IncrementSuicides

static function IncrementSuicides (UTPlayerReplicationInfo KilledPRI)


PawnTornOff

static function PawnTornOff (UTPawn DeadPawn)


ScoreKill

static function ScoreKill (UTPlayerReplicationInfo KillerPRI, UTPlayerReplicationInfo KilledPRI, Pawn KilledPawn)


ShouldGib

static function bool ShouldGib (UTPawn DeadPawn)

Parameters:

  • DeadPawn - is pawn killed by this damagetype

Returns:

whether or not we should gib due to damage

SpawnExtraGibEffects

simulated static function SpawnExtraGibEffects (UTGib TheGib)

allows special effects when gibs are spawned via DoCustomDamageEffects() instead of the normal way

SpawnGibEffects

static function SpawnGibEffects (UTGib Gib)

allows DamageType to spawn additional effects on gibs (such as flame trails)

SpawnHitEffect

static function SpawnHitEffect (Pawn P, float Damage, Object.Vector Momentum, name BoneName, Object.Vector HitLocation)

Possibly spawn a custom hit effect