Always snap to grid

UE3:UTPawn instance functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> Actor >> Pawn >> GamePawn >> UTPawn (instance functions)

Contents

UTPawn instance functions in other games:
UT3
Other member categories for this class:
defaults, events, internal variables

Instance functions[edit]

AbsorbDamage[edit]

function int AbsorbDamage (out int Damage, int CurrentShieldStrength, float AbsorptionRate)

AbsorbDamage() reduce damage and remove shields based on the absorption rate. returns the remaining armor strength.

ActuallyPlayFootstepSound[edit]

simulated function ActuallyPlayFootstepSound (int FootDown)

Handles actual playing of sound. Separated from PlayFootstepSound so we can ignore footstep sound notifies in first person.

AddDefaultInventory[edit]

function AddDefaultInventory ()

Overrides: Pawn.AddDefaultInventory


AddVelocity[edit]

function AddVelocity (Object.Vector NewVelocity, Object.Vector HitLocation, class<DamageTypeDamageType, optional Actor.TraceHitInfo HitInfo)

Overrides: Pawn.AddVelocity


AdjustCameraScale[edit]

simulated function AdjustCameraScale (bool bMoveCameraIn)

Overrides: Pawn.AdjustCameraScale

moves the camera in or out one

AdjustDamage[edit]

function AdjustDamage (out int inDamage, out Object.Vector momentum, Controller instigatedBy, Object.Vector hitlocation, class<DamageTypedamageType, optional Actor.TraceHitInfo HitInfo)

Overrides: Pawn.AdjustDamage


AdjustPPEffects[edit]

simulated function AdjustPPEffects (UTPlayerController PC, bool bRemove)


ApplyWeaponOverlayFlags[edit]

simulated function ApplyWeaponOverlayFlags (byte NewFlags)

This function is a pass-through to the weapon/weapon attachment that is used to set the various overlays

BotDodge[edit]

function Object.Vector BotDodge (Object.Vector Dir)


BotFire[edit]

function bool BotFire (bool bFinished)

Overrides: Pawn.BotFire

AI Interface for combat

CalcCamera[edit]

simulated function bool CalcCamera (float fDeltaTime, out Object.Vector out_CamLoc, out Object.Rotator out_CamRot, out float out_FOV)

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

simulated function bool CalcThirdPersonCam (float fDeltaTime, out Object.Vector out_CamLoc, out Object.Rotator out_CamRot, out float out_FOV)


CanDoubleJump[edit]

function bool CanDoubleJump ()


CanMultiJump[edit]

function bool CanMultiJump ()


CheckValidLocation[edit]

simulated function bool CheckValidLocation (Object.Vector FeignLocation)

Make sure location pawn ended up at out of feign death is valid (not through a wall)

ChooseFireMode[edit]

function byte ChooseFireMode ()

Overrides: Pawn.ChooseFireMode


ClearBodyMatColor[edit]

simulated function ClearBodyMatColor ()


ClearWeaponOverlayFlag[edit]

function ClearWeaponOverlayFlag (byte FlagToClear)


ClientReStart[edit]

simulated function ClientReStart ()

Overrides: Pawn.ClientReStart


CreateOverlayArmsMesh[edit]

simulated function CreateOverlayArmsMesh ()


DeactivateSpawnProtection[edit]

function DeactivateSpawnProtection ()


Died[edit]

function bool Died (Controller Killer, class<DamageTypedamageType, Object.Vector HitLocation)

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

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)

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

function bool Dodge (Actor.EDoubleClickDir DoubleClickMove)


DoDoubleJump[edit]

function DoDoubleJump (bool bUpdating)


DoingDeathAnim[edit]

simulated function DoingDeathAnim ()


DoJump[edit]

function bool DoJump (bool bUpdating)

Overrides: Pawn.DoJump


DoPlayEmote[edit]

simulated function DoPlayEmote (name InEmoteTag, int InPlayerID)

Play an emote given a category and index within that category.

DropFlag[edit]

function DropFlag ()


EnableInventoryPickup[edit]

function EnableInventoryPickup ()

EnableInventoryPickup() Set bCanPickupInventory to true

FaceRotation[edit]

simulated function FaceRotation (Object.Rotator NewRotation, float DeltaTime)

Overrides: Pawn.FaceRotation


FeignDeathDelayTimer[edit]

function FeignDeathDelayTimer ()

prevents player from getting out of feign death until the body has come to rest

FindGoodEndView[edit]

simulated function FindGoodEndView (PlayerController InPC, out Object.Rotator GoodRotation)

Overrides: Actor.FindGoodEndView

Used by PlayerController.FindGoodView() in RoundEnded State

FireRateChanged[edit]

simulated function FireRateChanged ()

called when FireRateMultiplier is changed to update weapon timers

FiringModeUpdated[edit]

simulated function FiringModeUpdated (Weapon InWeapon, byte InFiringMode, bool bViaReplication)

Overrides: Pawn.FiringModeUpdated

Called when FiringMode has been updated.

Network: ALL

ForceRagdoll[edit]

function ForceRagdoll ()

force the player to ragdoll, automatically getting up when the body comes to rest (basically, force activate the feign death code)

Gasp[edit]

function Gasp ()

Overrides: Pawn.Gasp


GetDebugName[edit]

function string GetDebugName ()

Overrides: Actor.GetDebugName

Overridden to return the actual player name from this Pawn's PlayerReplicationInfo (PRI) if available.

GetEyeHeight[edit]

simulated function float GetEyeHeight ()


GetFamilyInfo[edit]

simulated function class<UTFamilyInfoGetFamilyInfo ()


GetMaterialBelowFeet[edit]

simulated function name GetMaterialBelowFeet ()


GetOverlayMaterial[edit]

simulated function MaterialInterface GetOverlayMaterial ()

This function allows you to access the overlay material stack.

Returns:

the requested material instance

GetPawnAmbientSound[edit]

simulated function SoundCue GetPawnAmbientSound ()


GetPuttingDownWeapon[edit]

simulated function bool GetPuttingDownWeapon ()

Returns:

the value of bPuttingDownWeapon

GetQuickPickCells[edit]

simulated function GetQuickPickCells (UTHUD Hud, out array<QuickPickCellCells, out int CurrentWeaponIndex)


GetScreenName[edit]

simulated function string GetScreenName ()


GetShieldMaterialInstance[edit]

simulated function MaterialInterface GetShieldMaterialInstance (bool bTeamGame)

Returns:

the material to use for an overlay

GetShieldStrength[edit]

function int GetShieldStrength ()

GetShieldStrength() returns total armor value currently held by this pawn (not including helmet).

GetUTPlayerReplicationInfo[edit]

simulated function UTPlayerReplicationInfo GetUTPlayerReplicationInfo ()

Accessor to make sure we always get a valid UTPRI

GetWeaponAmbientSound[edit]

simulated function SoundCue GetWeaponAmbientSound ()


gibbedBy[edit]

function gibbedBy (Actor Other)

Overrides: Pawn.gibbedBy


GiveHealth[edit]

function bool GiveHealth (int HealAmount, int HealMax)


InCombat[edit]

function bool InCombat ()

InCombat() returns true if pawn is currently in combat, as defined by specific game implementation.

IsFirstPerson[edit]

simulated function bool IsFirstPerson ()

Overrides: Pawn.IsFirstPerson


IsLocationOnHead[edit]

function bool IsLocationOnHead (const out Actor.ImpactInfo Impact, float AdditionalScale)


JumpOffPawn[edit]

function JumpOffPawn ()

Overrides: Pawn.JumpOffPawn


JumpOutOfWater[edit]

function JumpOutOfWater (Object.Vector jumpDir)

Overrides: Pawn.JumpOutOfWater


LeaveABloodSplatterDecal[edit]

simulated function LeaveABloodSplatterDecal (Object.Vector HitLoc, Object.Vector HitNorm)

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

simulated function ModifyRotForDebugFreeCam (out Object.Rotator out_CamRot)


NeedToTurn[edit]

function bool NeedToTurn (Object.Vector targ)

Overrides: Pawn.NeedToTurn

returns whether we need to turn to fire at the specified location

NotifyTeamChanged[edit]

simulated function NotifyTeamChanged ()

Overrides: Pawn.NotifyTeamChanged

NotifyTeamChanged() Called when PlayerReplicationInfo is replicated to this pawn, or PlayerReplicationInfo team property changes.

Network: client

OnExitVehicle[edit]

function OnExitVehicle (UTSeqAct_ExitVehicle Action)

Kismet hook for kicking a Pawn out of a vehicle

OnInfiniteAmmo[edit]

function OnInfiniteAmmo (UTSeqAct_InfiniteAmmo Action)

Kismet hook for enabling/disabling infinite ammo for this Pawn

OnModifyHealth[edit]

simulated function OnModifyHealth (SeqAct_ModifyHealth Action)

Overrides: Actor.OnModifyHealth


OnPlayAnim[edit]

function OnPlayAnim (UTSeqAct_PlayAnim InAction)


OnUseHoverboard[edit]

function OnUseHoverboard (UTSeqAct_UseHoverboard Action)


PerformDodge[edit]

function bool PerformDodge (Actor.EDoubleClickDir DoubleClickMove, Object.Vector Dir, Object.Vector Cross)


PerformEmoteCommand[edit]

function PerformEmoteCommand (EmoteInfo EInfo, int PlayerID)

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

simulated function PlayDying (class<DamageTypeDamageType, Object.Vector HitLoc)

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

function PlayDyingSound ()

Overrides: Pawn.PlayDyingSound


PlayFeignDeath[edit]

simulated function PlayFeignDeath ()


PlayHit[edit]

function PlayHit (float Damage, Controller InstigatedBy, Object.Vector HitLocation, class<DamageTypedamageType, Object.Vector Momentum, Actor.TraceHitInfo HitInfo)

Overrides: Pawn.PlayHit


PlayTakeHitEffects[edit]

simulated function PlayTakeHitEffects ()

plays clientside hit effects using the data in LastTakeHitInfo

PlayTeleportEffect[edit]

function PlayTeleportEffect (bool bOut, bool bSound)

Overrides: Pawn.PlayTeleportEffect


PlayVictoryAnimation[edit]

function PlayVictoryAnimation ()


PossessedBy[edit]

function PossessedBy (Controller C, bool bVehicleTransition)

Overrides: Pawn.PossessedBy


PostBigTeleport[edit]

simulated function PostBigTeleport ()

Called when teleporting

PostTeleport[edit]

simulated function PostTeleport (Teleporter OutTeleporter)

Overrides: Actor.PostTeleport


PoweredUp[edit]

function bool PoweredUp ()

PoweredUp() returns true if pawn has game play advantages, as defined by specific game implementation

QuickPick[edit]

simulated function QuickPick (int Quad)


RangedAttackTime[edit]

function float RangedAttackTime ()

Overrides: Pawn.RangedAttackTime


ReattachMesh[edit]

simulated function ReattachMesh ()

Overrides: GamePawn.ReattachMesh

reattaches the mesh component, because settings were updated

RecommendLongRangedAttack[edit]

function bool RecommendLongRangedAttack ()

Overrides: Pawn.RecommendLongRangedAttack


RenderMapIcon[edit]

simulated function RenderMapIcon (UTMapInfo MP, Canvas Canvas, UTPlayerController PlayerOwner, Object.LinearColor FinalColor)


ResetCharPhysState[edit]

simulated function ResetCharPhysState ()


ServerFeignDeath[edit]

reliable server function ServerFeignDeath ()


ServerHoverboard[edit]

reliable server function ServerHoverboard ()


ServerPlayEmote[edit]

reliable server function ServerPlayEmote (name InEmoteTag, int InPlayerID)


SetAnimRateScale[edit]

simulated function SetAnimRateScale (float RateScale)

Util for scaling running anims etc.

SetArmsSkin[edit]

simulated protected function SetArmsSkin (MaterialInterface NewMaterial)


SetBigHead[edit]

function SetBigHead ()

Called by Bighead mutator when spawned, and also if bKillsAffectHead when kill someone

SetBodyMatColor[edit]

simulated function SetBodyMatColor (Object.LinearColor NewBodyMatColor, float NewOverlayDuration)


SetCharacterClassFromInfo[edit]

simulated function SetCharacterClassFromInfo (class<UTFamilyInfoInfo)

Set various basic properties for this UTPawn based on the character class metadata

SetCharacterMeshInfo[edit]

simulated function SetCharacterMeshInfo (SkeletalMesh SkelMesh, MaterialInterface HeadMaterial, MaterialInterface BodyMaterial)

Accessor that sets the character mesh to use for this pawn, and updates instance of player in map if there is one.

SetFeignEndLocation[edit]

simulated function bool SetFeignEndLocation (Object.Vector HitLocation, Object.Vector FeignLocation)


SetFirstPersonArmsInfo[edit]

simulated function SetFirstPersonArmsInfo (SkeletalMesh FirstPersonArmMesh, MaterialInterface ArmMaterial)

Assign an arm mesh and material to this pawn

SetHandIKEnabled[edit]

simulated function SetHandIKEnabled (bool bEnabled)

Enable or disable IK that keeps hands on IK bones.

SetHeroCam[edit]

simulated function SetHeroCam (out Object.Rotator out_CamRot)


SetInvisible[edit]

simulated function SetInvisible (bool bNowInvisible)


SetMeshVisibility[edit]

simulated function SetMeshVisibility (bool bVisible)

sets whether or not the owner of this pawn can see it

SetOverlayMaterial[edit]

simulated function SetOverlayMaterial (MaterialInterface NewOverlay)

Apply a given overlay material to the overlay mesh.

Parameters:

  • NewOverlay - The material to overlay

SetOverlayVisibility[edit]

simulated function SetOverlayVisibility (bool bVisible)


SetPawnAmbientSound[edit]

simulated function SetPawnAmbientSound (SoundCue NewAmbientSound)

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

simulated function SetPawnRBChannels (bool bRagdollMode)


SetPuttingDownWeapon[edit]

simulated function SetPuttingDownWeapon (bool bNowPuttingDownWeapon)

sets the value of bPuttingDownWeapon and plays any appropriate animations for the change

SetSkin[edit]

simulated function SetSkin (Material NewMaterial)

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

simulated function SetTeamColor ()

When a pawn's team is set or replicated, SetTeamColor is called. By default, this will setup any required material parameters.

SetThirdPersonCamera[edit]

simulated function SetThirdPersonCamera (bool bNewBehindView)


SetWeapAnimType[edit]

simulated function SetWeapAnimType (EWeapAnimType AnimType)

Change the type of weapon animation we are playing.

SetWeaponAmbientSound[edit]

simulated function SetWeaponAmbientSound (SoundCue NewAmbientSound)

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

simulated function SetWeaponAttachmentVisibility (bool bAttachmentVisible)


SetWeaponOverlayFlag[edit]

function SetWeaponOverlayFlag (byte FlagToSet)


SetWeaponVisibility[edit]

simulated function SetWeaponVisibility (bool bWeaponVisible)


ShieldAbsorb[edit]

function int ShieldAbsorb (int Damage)

ShieldAbsorb() returns the resultant amount of damage after shields have absorbed what they can

ShouldGib[edit]

simulated function bool ShouldGib (class<UTDamageTypeUTDamageType)

Returns:

whether or not we should gib due to damage from the passed in damagetype

SpawnDefaultController[edit]

function SpawnDefaultController ()

Overrides: Pawn.SpawnDefaultController

Spawn default controller for this Pawn, get possessed by it.

SpawnGib[edit]

simulated function UTGib SpawnGib (class<UTGibGibClass, name BoneName, class<UTDamageTypeUTDamageType, Object.Vector HitLocation, bool bSpinGib)


SpawnGibs[edit]

simulated function SpawnGibs (class<UTDamageTypeUTDamageType, Object.Vector HitLocation)

spawns gibs and hides the pawn's mesh

SpawnHeadGib[edit]

simulated function SpawnHeadGib (class<UTDamageTypeUTDamageType, Object.Vector HitLocation)

spawn a special gib for this pawn's head and sets it as the ViewTarget for any players that were viewing this pawn

SpawnTransEffect[edit]

function SpawnTransEffect (int TeamNum)


StartFire[edit]

simulated function StartFire (byte FireModeNum)

Overrides: Pawn.StartFire

(Description copied from Pawn.StartFire)
Pawn starts firing! Called from PlayerController::StartFiring Network: Local Player

Parameters:

  • FireModeNum - fire mode number

StartFlying[edit]

simulated function StartFlying ()

Flying support

StopFiring[edit]

function bool StopFiring ()

Overrides: Pawn.StopFiring


StopFlying[edit]

simulated function StopFlying ()


StopWeaponFiring[edit]

function bool StopWeaponFiring ()


SwitchWeapon[edit]

simulated function SwitchWeapon (byte NewGroup)


TakeDrowningDamage[edit]

function TakeDrowningDamage ()

Overrides: Pawn.TakeDrowningDamage


TakeFallingDamage[edit]

simulated function TakeFallingDamage ()

Overrides: Pawn.TakeFallingDamage


TakeHeadShot[edit]

function bool TakeHeadShot (const out Actor.ImpactInfo Impact, class<UTDamageTypeHeadShotDamageType, int HeadDamage, float AdditionalScale, Controller InstigatingController)

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

function ThrowActiveWeapon ()

Overrides: Pawn.ThrowActiveWeapon

Toss active weapon using default settings (location+velocity).

TryNewCamRot[edit]

simulated function bool TryNewCamRot (UTPlayerController PC, Object.Rotator ViewRotation, out float CamDist)


TurnOff[edit]

simulated function TurnOff ()

Overrides: Pawn.TurnOff

TurnOff() Freeze pawn - stop sounds, animations, physics, weapon firing

TurnOffPawn[edit]

simulated function TurnOffPawn ()


VerifyBodyMaterialInstance[edit]

simulated function bool 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[edit]

simulated function WeaponAttachmentChanged ()

Called when there is a need to change the weapon attachment (either via replication or locally if controlled.

WeaponBob[edit]

simulated function Object.Vector WeaponBob (float BobDamping, float JumpDamping)


WeaponChanged[edit]

simulated function WeaponChanged (UTWeapon NewWeapon)

Called when a weapon is changed and is responsible for making sure the new weapon respects the current pawn's states/etc.

WeaponFired[edit]

simulated function WeaponFired (Weapon InWeapon, bool bViaReplication, optional Object.Vector HitLocation)

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

simulated function WeaponStoppedFiring (Weapon InWeapon, bool bViaReplication)

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