The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall
UE3:UTPawn instance functions (UDK)
Contents
- 1 Instance functions
- 1.1 AbsorbDamage
- 1.2 ActuallyPlayFootstepSound
- 1.3 AddDefaultInventory
- 1.4 AddVelocity
- 1.5 AdjustCameraScale
- 1.6 AdjustDamage
- 1.7 AdjustPPEffects
- 1.8 ApplyWeaponOverlayFlags
- 1.9 BotDodge
- 1.10 BotFire
- 1.11 CalcCamera
- 1.12 CalcThirdPersonCam
- 1.13 CanDoubleJump
- 1.14 CanMultiJump
- 1.15 CheckValidLocation
- 1.16 ChooseFireMode
- 1.17 ClearBodyMatColor
- 1.18 ClearWeaponOverlayFlag
- 1.19 ClientReStart
- 1.20 CreateOverlayArmsMesh
- 1.21 DeactivateSpawnProtection
- 1.22 Died
- 1.23 DisplayDebug
- 1.24 Dodge
- 1.25 DoDoubleJump
- 1.26 DoingDeathAnim
- 1.27 DoJump
- 1.28 DoPlayEmote
- 1.29 DropFlag
- 1.30 EnableInventoryPickup
- 1.31 FaceRotation
- 1.32 FeignDeathDelayTimer
- 1.33 FindGoodEndView
- 1.34 FireRateChanged
- 1.35 FiringModeUpdated
- 1.36 ForceRagdoll
- 1.37 Gasp
- 1.38 GetDebugName
- 1.39 GetEyeHeight
- 1.40 GetFamilyInfo
- 1.41 GetMaterialBelowFeet
- 1.42 GetOverlayMaterial
- 1.43 GetPawnAmbientSound
- 1.44 GetPuttingDownWeapon
- 1.45 GetQuickPickCells
- 1.46 GetScreenName
- 1.47 GetShieldMaterialInstance
- 1.48 GetShieldStrength
- 1.49 GetUTPlayerReplicationInfo
- 1.50 GetWeaponAmbientSound
- 1.51 gibbedBy
- 1.52 GiveHealth
- 1.53 InCombat
- 1.54 IsFirstPerson
- 1.55 IsLocationOnHead
- 1.56 JumpOffPawn
- 1.57 JumpOutOfWater
- 1.58 LeaveABloodSplatterDecal
- 1.59 ModifyRotForDebugFreeCam
- 1.60 NeedToTurn
- 1.61 NotifyTeamChanged
- 1.62 OnExitVehicle
- 1.63 OnInfiniteAmmo
- 1.64 OnModifyHealth
- 1.65 OnPlayAnim
- 1.66 OnUseHoverboard
- 1.67 PerformDodge
- 1.68 PerformEmoteCommand
- 1.69 PlayDying
- 1.70 PlayDyingSound
- 1.71 PlayFeignDeath
- 1.72 PlayHit
- 1.73 PlayTakeHitEffects
- 1.74 PlayTeleportEffect
- 1.75 PlayVictoryAnimation
- 1.76 PossessedBy
- 1.77 PostBigTeleport
- 1.78 PostTeleport
- 1.79 PoweredUp
- 1.80 QuickPick
- 1.81 RangedAttackTime
- 1.82 ReattachMesh
- 1.83 RecommendLongRangedAttack
- 1.84 RenderMapIcon
- 1.85 ResetCharPhysState
- 1.86 ServerFeignDeath
- 1.87 ServerHoverboard
- 1.88 ServerPlayEmote
- 1.89 SetAnimRateScale
- 1.90 SetArmsSkin
- 1.91 SetBigHead
- 1.92 SetBodyMatColor
- 1.93 SetCharacterClassFromInfo
- 1.94 SetCharacterMeshInfo
- 1.95 SetFeignEndLocation
- 1.96 SetFirstPersonArmsInfo
- 1.97 SetHandIKEnabled
- 1.98 SetHeroCam
- 1.99 SetInvisible
- 1.100 SetMeshVisibility
- 1.101 SetOverlayMaterial
- 1.102 SetOverlayVisibility
- 1.103 SetPawnAmbientSound
- 1.104 SetPawnRBChannels
- 1.105 SetPuttingDownWeapon
- 1.106 SetSkin
- 1.107 SetTeamColor
- 1.108 SetThirdPersonCamera
- 1.109 SetWeapAnimType
- 1.110 SetWeaponAmbientSound
- 1.111 SetWeaponAttachmentVisibility
- 1.112 SetWeaponOverlayFlag
- 1.113 SetWeaponVisibility
- 1.114 ShieldAbsorb
- 1.115 ShouldGib
- 1.116 SpawnDefaultController
- 1.117 SpawnGib
- 1.118 SpawnGibs
- 1.119 SpawnHeadGib
- 1.120 SpawnTransEffect
- 1.121 StartFire
- 1.122 StartFlying
- 1.123 StopFiring
- 1.124 StopFlying
- 1.125 StopWeaponFiring
- 1.126 SwitchWeapon
- 1.127 TakeDrowningDamage
- 1.128 TakeFallingDamage
- 1.129 TakeHeadShot
- 1.130 ThrowActiveWeapon
- 1.131 TryNewCamRot
- 1.132 TurnOff
- 1.133 TurnOffPawn
- 1.134 VerifyBodyMaterialInstance
- 1.135 WeaponAttachmentChanged
- 1.136 WeaponBob
- 1.137 WeaponChanged
- 1.138 WeaponFired
- 1.139 WeaponStoppedFiring
- UTPawn instance functions in other games:
- UT3
- Other member categories for this class:
- defaults, events, internal variables
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Instance functions
AbsorbDamage
AbsorbDamage() reduce damage and remove shields based on the absorption rate. returns the remaining armor strength.
ActuallyPlayFootstepSound
Handles actual playing of sound. Separated from PlayFootstepSound so we can ignore footstep sound notifies in first person.
AddDefaultInventory
Overrides: Pawn.AddDefaultInventory
AddVelocity
Overrides: Pawn.AddVelocity
AdjustCameraScale
Overrides: Pawn.AdjustCameraScale
moves the camera in or out one
AdjustDamage
Overrides: Pawn.AdjustDamage
AdjustPPEffects
ApplyWeaponOverlayFlags
This function is a pass-through to the weapon/weapon attachment that is used to set the various overlays
BotDodge
BotFire
Overrides: Pawn.BotFire
AI Interface for combat
CalcCamera
Overrides: Actor.CalcCamera
Calculate camera view point, when viewing this pawn.
Parameters:
- fDeltaTime - delta time seconds since last update
- out_CamLoc - Camera Location
- out_CamRot - Camera Rotation
- out_FOV - Field of View
Returns:
- true if Pawn should provide the camera point of view.
CalcThirdPersonCam
CanDoubleJump
CanMultiJump
CheckValidLocation
Make sure location pawn ended up at out of feign death is valid (not through a wall)
ChooseFireMode
Overrides: Pawn.ChooseFireMode
ClearBodyMatColor
ClearWeaponOverlayFlag
ClientReStart
Overrides: Pawn.ClientReStart
CreateOverlayArmsMesh
DeactivateSpawnProtection
Died
Overrides: Pawn.Died
(Description copied from Pawn.Died)
This pawn has died.
Parameters:
- Killer - Who killed this pawn
- DamageType - What killed it
- HitLocation - Where did the hit occur
Returns:
- true if allowed
DisplayDebug
Overrides: Pawn.DisplayDebug
(Description copied from Pawn.DisplayDebug)
list important Pawn variables on canvas. HUD will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used
Parameters:
- HUD - HUD with canvas to draw on
- out_YL - Height of the current font
- out_YPos - Y position on Canvas. out_YPos += out_YL, gives position to draw text for next debug line.
Dodge
DoDoubleJump
DoingDeathAnim
DoJump
Overrides: Pawn.DoJump
DoPlayEmote
Play an emote given a category and index within that category.
DropFlag
EnableInventoryPickup
EnableInventoryPickup() Set bCanPickupInventory to true
FaceRotation
Overrides: Pawn.FaceRotation
FeignDeathDelayTimer
prevents player from getting out of feign death until the body has come to rest
FindGoodEndView
Overrides: Actor.FindGoodEndView
Used by PlayerController.FindGoodView() in RoundEnded State
FireRateChanged
called when FireRateMultiplier is changed to update weapon timers
FiringModeUpdated
Overrides: Pawn.FiringModeUpdated
Called when FiringMode has been updated.
Network: ALL
ForceRagdoll
force the player to ragdoll, automatically getting up when the body comes to rest (basically, force activate the feign death code)
Gasp
Overrides: Pawn.Gasp
GetDebugName
Overrides: Actor.GetDebugName
Overridden to return the actual player name from this Pawn's PlayerReplicationInfo (PRI) if available.
GetEyeHeight
GetFamilyInfo
GetMaterialBelowFeet
GetOverlayMaterial
This function allows you to access the overlay material stack.
Returns:
- the requested material instance
GetPawnAmbientSound
GetPuttingDownWeapon
Returns:
- the value of bPuttingDownWeapon
GetQuickPickCells
GetScreenName
GetShieldMaterialInstance
Returns:
- the material to use for an overlay
GetShieldStrength
GetShieldStrength() returns total armor value currently held by this pawn (not including helmet).
GetUTPlayerReplicationInfo
Accessor to make sure we always get a valid UTPRI
GetWeaponAmbientSound
gibbedBy
Overrides: Pawn.gibbedBy
GiveHealth
InCombat
InCombat() returns true if pawn is currently in combat, as defined by specific game implementation.
IsFirstPerson
Overrides: Pawn.IsFirstPerson
IsLocationOnHead
JumpOffPawn
Overrides: Pawn.JumpOffPawn
JumpOutOfWater
Overrides: Pawn.JumpOutOfWater
LeaveABloodSplatterDecal
This will trace against the world and leave a blood splatter decal.
This is used for having a back spray / exit wound blood effect on the wall behind us.
ModifyRotForDebugFreeCam
NeedToTurn
Overrides: Pawn.NeedToTurn
returns whether we need to turn to fire at the specified location
NotifyTeamChanged
Overrides: Pawn.NotifyTeamChanged
NotifyTeamChanged() Called when PlayerReplicationInfo is replicated to this pawn, or PlayerReplicationInfo team property changes.
Network: client
OnExitVehicle
Kismet hook for kicking a Pawn out of a vehicle
OnInfiniteAmmo
Kismet hook for enabling/disabling infinite ammo for this Pawn
OnModifyHealth
Overrides: Actor.OnModifyHealth
OnPlayAnim
OnUseHoverboard
PerformDodge
PerformEmoteCommand
Performs an Emote command. This is typically an action that tells the bots to do something. It is server-side only
Parameters:
- EInfo - The emote we are working with
- PlayerID - The ID of the player this emote is directed at. 255 = All Players
PlayDying
Overrides: Pawn.PlayDying
Responsible for playing any death effects, animations, etc.
Parameters:
- DamageType - type of damage responsible for this pawn's death
- HitLoc - location of the final shot
PlayDyingSound
Overrides: Pawn.PlayDyingSound
PlayFeignDeath
PlayHit
Overrides: Pawn.PlayHit
PlayTakeHitEffects
plays clientside hit effects using the data in LastTakeHitInfo
PlayTeleportEffect
Overrides: Pawn.PlayTeleportEffect
PlayVictoryAnimation
PossessedBy
Overrides: Pawn.PossessedBy
PostBigTeleport
Called when teleporting
PostTeleport
Overrides: Actor.PostTeleport
PoweredUp
PoweredUp() returns true if pawn has game play advantages, as defined by specific game implementation
QuickPick
RangedAttackTime
Overrides: Pawn.RangedAttackTime
ReattachMesh
Overrides: GamePawn.ReattachMesh
reattaches the mesh component, because settings were updated
RecommendLongRangedAttack
Overrides: Pawn.RecommendLongRangedAttack
RenderMapIcon
ResetCharPhysState
ServerFeignDeath
ServerHoverboard
ServerPlayEmote
SetAnimRateScale
Util for scaling running anims etc.
SetArmsSkin
SetBigHead
Called by Bighead mutator when spawned, and also if bKillsAffectHead when kill someone
SetBodyMatColor
SetCharacterClassFromInfo
Set various basic properties for this UTPawn based on the character class metadata
SetCharacterMeshInfo
Accessor that sets the character mesh to use for this pawn, and updates instance of player in map if there is one.
SetFeignEndLocation
SetFirstPersonArmsInfo
Assign an arm mesh and material to this pawn
SetHandIKEnabled
Enable or disable IK that keeps hands on IK bones.
SetHeroCam
SetInvisible
SetMeshVisibility
sets whether or not the owner of this pawn can see it
SetOverlayMaterial
Apply a given overlay material to the overlay mesh.
Parameters:
- NewOverlay - The material to overlay
SetOverlayVisibility
SetPawnAmbientSound
starts playing the given sound via the PawnAmbientSound AudioComponent and sets PawnAmbientSoundCue for replicating to clients
Parameters:
- NewAmbientSound - the new sound to play, or None to stop any ambient that was playing
SetPawnRBChannels
SetPuttingDownWeapon
sets the value of bPuttingDownWeapon and plays any appropriate animations for the change
SetSkin
SetSkin is used to apply a single material to the entire model, including any applicable attachments. NOTE: Attachments (ie: the weapons) need to handle resetting their default skin if NewMaterinal = NONE
Parameters:
- NewMaterial - The material to apply
SetTeamColor
When a pawn's team is set or replicated, SetTeamColor is called. By default, this will setup any required material parameters.
SetThirdPersonCamera
SetWeapAnimType
Change the type of weapon animation we are playing.
SetWeaponAmbientSound
starts playing the given sound via the WeaponAmbientSound AudioComponent and sets WeaponAmbientSoundCue for replicating to clients
Parameters:
- NewAmbientSound - the new sound to play, or None to stop any ambient that was playing
SetWeaponAttachmentVisibility
SetWeaponOverlayFlag
SetWeaponVisibility
ShieldAbsorb
ShieldAbsorb() returns the resultant amount of damage after shields have absorbed what they can
ShouldGib
Returns:
- whether or not we should gib due to damage from the passed in damagetype
SpawnDefaultController
Overrides: Pawn.SpawnDefaultController
Spawn default controller for this Pawn, get possessed by it.
SpawnGib
SpawnGibs
spawns gibs and hides the pawn's mesh
SpawnHeadGib
spawn a special gib for this pawn's head and sets it as the ViewTarget for any players that were viewing this pawn
SpawnTransEffect
StartFire
Overrides: Pawn.StartFire
(Description copied from Pawn.StartFire)
Pawn starts firing! Called from PlayerController::StartFiring Network: Local Player
Parameters:
- FireModeNum - fire mode number
StartFlying
Flying support
StopFiring
Overrides: Pawn.StopFiring
StopFlying
StopWeaponFiring
SwitchWeapon
TakeDrowningDamage
Overrides: Pawn.TakeDrowningDamage
TakeFallingDamage
Overrides: Pawn.TakeFallingDamage
TakeHeadShot
TakeHeadShot()
Parameters:
- Impact - impact information (where the shot hit)
- HeadShotDamageType - damagetype to use if this is a headshot
- HeadDamage - amount of damage the weapon causes if this is a headshot
- AdditionalScale - head sphere scaling for head hit determination
Returns:
- true if pawn handled this as a headshot, in which case the weapon doesn't need to cause damage to the pawn.
ThrowActiveWeapon
Overrides: Pawn.ThrowActiveWeapon
Toss active weapon using default settings (location+velocity).
TryNewCamRot
TurnOff
Overrides: Pawn.TurnOff
TurnOff() Freeze pawn - stop sounds, animations, physics, weapon firing
TurnOffPawn
VerifyBodyMaterialInstance
This function will verify that the BodyMaterialInstance variable is setup and ready to go. This is a key component for the BodyMat overlay system
WeaponAttachmentChanged
Called when there is a need to change the weapon attachment (either via replication or locally if controlled.
WeaponBob
WeaponChanged
Called when a weapon is changed and is responsible for making sure the new weapon respects the current pawn's states/etc.
WeaponFired
Overrides: Pawn.WeaponFired
Called when a pawn's weapon has fired and is responsibile for delegating the creation off all of the different effects.
bViaReplication denotes if this call in as the result of the flashcount/flashlocation being replicated. It's used filter out when to make the effects.
WeaponStoppedFiring
Overrides: Pawn.WeaponStoppedFiring
Called when a pawn's weapon has stopped firing and is responsibile for delegating the destruction of all of the different effects.
bViaReplication denotes if this call in as the result of the flashcount/flashlocation being replicated.
Network: ALL