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[edit]

Property group 'DeathAnim'[edit]

bAnimateHipsForDeathAnim[edit]

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[edit]

Type: name

Name of animation to play upon death.

DeathAnimRate[edit]

Type: float

How fast to play the death animation

Default value: 1.0

MotorDecayTime[edit]

Type: float

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

StopAnimAfterDamageInterval[edit]

Type: float

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

Property group 'UTDamageType'[edit]

bUseDamageBasedDeathEffects[edit]

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[edit]

See UTDamageType internal variables.

Default values[edit]

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

Static functions[edit]

BoneBreaker[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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


DrawKillIcon[edit]

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


GetDeathCameraEffectInstigator[edit]

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[edit]

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[edit]

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[edit]

static function name GetStatsName (name StatType)


IncrementDeaths[edit]

static function IncrementDeaths (UTPlayerReplicationInfo KilledPRI)


IncrementKills[edit]

static function int IncrementKills (UTPlayerReplicationInfo KillerPRI)


IncrementSuicides[edit]

static function IncrementSuicides (UTPlayerReplicationInfo KilledPRI)


PawnTornOff[edit]

static function PawnTornOff (UTPawn DeadPawn)


ScoreKill[edit]

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


ShouldGib[edit]

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[edit]

simulated static function SpawnExtraGibEffects (UTGib TheGib)

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

SpawnGibEffects[edit]

static function SpawnGibEffects (UTGib Gib)

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

SpawnHitEffect[edit]

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

Possibly spawn a custom hit effect