Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:UTPawn instance functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 05:53, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 7))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

AbsorbDamage

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

simulated function ActuallyPlayFootstepSound (int FootDown)

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

AddDefaultInventory

function AddDefaultInventory ()

Overrides: Pawn.AddDefaultInventory


AddVelocity

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

Overrides: Pawn.AddVelocity


AdjustCameraScale

simulated function AdjustCameraScale (bool bMoveCameraIn)

Overrides: Pawn.AdjustCameraScale

moves the camera in or out one

AdjustDamage

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

Overrides: Pawn.AdjustDamage


AdjustPPEffects

simulated function AdjustPPEffects (UTPlayerController PC, bool bRemove)


ApplyWeaponOverlayFlags

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

function Object.Vector BotDodge (Object.Vector Dir)


BotFire

function bool BotFire (bool bFinished)

Overrides: Pawn.BotFire

AI Interface for combat

CalcCamera

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

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


CanDoubleJump

function bool CanDoubleJump ()


CanMultiJump

function bool CanMultiJump ()


CheckValidLocation

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

function byte ChooseFireMode ()

Overrides: Pawn.ChooseFireMode


ClearBodyMatColor

simulated function ClearBodyMatColor ()


ClearWeaponOverlayFlag

function ClearWeaponOverlayFlag (byte FlagToClear)


ClientReStart

simulated function ClientReStart ()

Overrides: Pawn.ClientReStart


CreateOverlayArmsMesh

simulated function CreateOverlayArmsMesh ()


DeactivateSpawnProtection

function DeactivateSpawnProtection ()


Died

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

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

function bool Dodge (Actor.EDoubleClickDir DoubleClickMove)


DoDoubleJump

function DoDoubleJump (bool bUpdating)


DoingDeathAnim

simulated function DoingDeathAnim ()


DoJump

function bool DoJump (bool bUpdating)

Overrides: Pawn.DoJump


DoPlayEmote

simulated function DoPlayEmote (name InEmoteTag, int InPlayerID)

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

DropFlag

function DropFlag ()


EnableInventoryPickup

function EnableInventoryPickup ()

EnableInventoryPickup() Set bCanPickupInventory to true

FaceRotation

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

Overrides: Pawn.FaceRotation


FeignDeathDelayTimer

function FeignDeathDelayTimer ()

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

FindGoodEndView

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

Overrides: Actor.FindGoodEndView

Used by PlayerController.FindGoodView() in RoundEnded State

FireRateChanged

simulated function FireRateChanged ()

called when FireRateMultiplier is changed to update weapon timers

FiringModeUpdated

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

Overrides: Pawn.FiringModeUpdated

Called when FiringMode has been updated.

Network: ALL

ForceRagdoll

function ForceRagdoll ()

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

Gasp

function Gasp ()

Overrides: Pawn.Gasp


GetDebugName

function string GetDebugName ()

Overrides: Actor.GetDebugName

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

GetEyeHeight

simulated function float GetEyeHeight ()


GetFamilyInfo

simulated function class<UTFamilyInfoGetFamilyInfo ()


GetMaterialBelowFeet

simulated function name GetMaterialBelowFeet ()


GetOverlayMaterial

simulated function MaterialInterface GetOverlayMaterial ()

This function allows you to access the overlay material stack.

Returns:

the requested material instance

GetPawnAmbientSound

simulated function SoundCue GetPawnAmbientSound ()


GetPuttingDownWeapon

simulated function bool GetPuttingDownWeapon ()

Returns:

the value of bPuttingDownWeapon

GetQuickPickCells

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


GetScreenName

simulated function string GetScreenName ()


GetShieldMaterialInstance

simulated function MaterialInterface GetShieldMaterialInstance (bool bTeamGame)

Returns:

the material to use for an overlay

GetShieldStrength

function int GetShieldStrength ()

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

GetUTPlayerReplicationInfo

simulated function UTPlayerReplicationInfo GetUTPlayerReplicationInfo ()

Accessor to make sure we always get a valid UTPRI

GetWeaponAmbientSound

simulated function SoundCue GetWeaponAmbientSound ()


gibbedBy

function gibbedBy (Actor Other)

Overrides: Pawn.gibbedBy


GiveHealth

function bool GiveHealth (int HealAmount, int HealMax)


InCombat

function bool InCombat ()

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

IsFirstPerson

simulated function bool IsFirstPerson ()

Overrides: Pawn.IsFirstPerson


IsLocationOnHead

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


JumpOffPawn

function JumpOffPawn ()

Overrides: Pawn.JumpOffPawn


JumpOutOfWater

function JumpOutOfWater (Object.Vector jumpDir)

Overrides: Pawn.JumpOutOfWater


LeaveABloodSplatterDecal

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

simulated function ModifyRotForDebugFreeCam (out Object.Rotator out_CamRot)


NeedToTurn

function bool NeedToTurn (Object.Vector targ)

Overrides: Pawn.NeedToTurn

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

NotifyTeamChanged

simulated function NotifyTeamChanged ()

Overrides: Pawn.NotifyTeamChanged

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

Network: client

OnExitVehicle

function OnExitVehicle (UTSeqAct_ExitVehicle Action)

Kismet hook for kicking a Pawn out of a vehicle

OnInfiniteAmmo

function OnInfiniteAmmo (UTSeqAct_InfiniteAmmo Action)

Kismet hook for enabling/disabling infinite ammo for this Pawn

OnModifyHealth

simulated function OnModifyHealth (SeqAct_ModifyHealth Action)

Overrides: Actor.OnModifyHealth


OnPlayAnim

function OnPlayAnim (UTSeqAct_PlayAnim InAction)


OnUseHoverboard

function OnUseHoverboard (UTSeqAct_UseHoverboard Action)


PerformDodge

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


PerformEmoteCommand

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

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

function PlayDyingSound ()

Overrides: Pawn.PlayDyingSound


PlayFeignDeath

simulated function PlayFeignDeath ()


PlayHit

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

Overrides: Pawn.PlayHit


PlayTakeHitEffects

simulated function PlayTakeHitEffects ()

plays clientside hit effects using the data in LastTakeHitInfo

PlayTeleportEffect

function PlayTeleportEffect (bool bOut, bool bSound)

Overrides: Pawn.PlayTeleportEffect


PlayVictoryAnimation

function PlayVictoryAnimation ()


PossessedBy

function PossessedBy (Controller C, bool bVehicleTransition)

Overrides: Pawn.PossessedBy


PostBigTeleport

simulated function PostBigTeleport ()

Called when teleporting

PostTeleport

simulated function PostTeleport (Teleporter OutTeleporter)

Overrides: Actor.PostTeleport


PoweredUp

function bool PoweredUp ()

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

QuickPick

simulated function QuickPick (int Quad)


RangedAttackTime

function float RangedAttackTime ()

Overrides: Pawn.RangedAttackTime


ReattachMesh

simulated function ReattachMesh ()

Overrides: GamePawn.ReattachMesh

reattaches the mesh component, because settings were updated

RecommendLongRangedAttack

function bool RecommendLongRangedAttack ()

Overrides: Pawn.RecommendLongRangedAttack


RenderMapIcon

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


ResetCharPhysState

simulated function ResetCharPhysState ()


ServerFeignDeath

reliable server function ServerFeignDeath ()


ServerHoverboard

reliable server function ServerHoverboard ()


ServerPlayEmote

reliable server function ServerPlayEmote (name InEmoteTag, int InPlayerID)


SetAnimRateScale

simulated function SetAnimRateScale (float RateScale)

Util for scaling running anims etc.

SetArmsSkin

simulated protected function SetArmsSkin (MaterialInterface NewMaterial)


SetBigHead

function SetBigHead ()

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

SetBodyMatColor

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


SetCharacterClassFromInfo

simulated function SetCharacterClassFromInfo (class<UTFamilyInfoInfo)

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

SetCharacterMeshInfo

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

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


SetFirstPersonArmsInfo

simulated function SetFirstPersonArmsInfo (SkeletalMesh FirstPersonArmMesh, MaterialInterface ArmMaterial)

Assign an arm mesh and material to this pawn

SetHandIKEnabled

simulated function SetHandIKEnabled (bool bEnabled)

Enable or disable IK that keeps hands on IK bones.

SetHeroCam

simulated function SetHeroCam (out Object.Rotator out_CamRot)


SetInvisible

simulated function SetInvisible (bool bNowInvisible)


SetMeshVisibility

simulated function SetMeshVisibility (bool bVisible)

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

SetOverlayMaterial

simulated function SetOverlayMaterial (MaterialInterface NewOverlay)

Apply a given overlay material to the overlay mesh.

Parameters:

  • NewOverlay - The material to overlay

SetOverlayVisibility

simulated function SetOverlayVisibility (bool bVisible)


SetPawnAmbientSound

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

simulated function SetPawnRBChannels (bool bRagdollMode)


SetPuttingDownWeapon

simulated function SetPuttingDownWeapon (bool bNowPuttingDownWeapon)

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

SetSkin

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

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

simulated function SetThirdPersonCamera (bool bNewBehindView)


SetWeapAnimType

simulated function SetWeapAnimType (EWeapAnimType AnimType)

Change the type of weapon animation we are playing.

SetWeaponAmbientSound

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

simulated function SetWeaponAttachmentVisibility (bool bAttachmentVisible)


SetWeaponOverlayFlag

function SetWeaponOverlayFlag (byte FlagToSet)


SetWeaponVisibility

simulated function SetWeaponVisibility (bool bWeaponVisible)


ShieldAbsorb

function int ShieldAbsorb (int Damage)

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

ShouldGib

simulated function bool ShouldGib (class<UTDamageTypeUTDamageType)

Returns:

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

SpawnDefaultController

function SpawnDefaultController ()

Overrides: Pawn.SpawnDefaultController

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

SpawnGib

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


SpawnGibs

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

spawns gibs and hides the pawn's mesh

SpawnHeadGib

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

function SpawnTransEffect (int TeamNum)


StartFire

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

simulated function StartFlying ()

Flying support

StopFiring

function bool StopFiring ()

Overrides: Pawn.StopFiring


StopFlying

simulated function StopFlying ()


StopWeaponFiring

function bool StopWeaponFiring ()


SwitchWeapon

simulated function SwitchWeapon (byte NewGroup)


TakeDrowningDamage

function TakeDrowningDamage ()

Overrides: Pawn.TakeDrowningDamage


TakeFallingDamage

simulated function TakeFallingDamage ()

Overrides: Pawn.TakeFallingDamage


TakeHeadShot

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

function ThrowActiveWeapon ()

Overrides: Pawn.ThrowActiveWeapon

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

TryNewCamRot

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


TurnOff

simulated function TurnOff ()

Overrides: Pawn.TurnOff

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

TurnOffPawn

simulated function TurnOffPawn ()


VerifyBodyMaterialInstance

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

simulated function WeaponAttachmentChanged ()

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

WeaponBob

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


WeaponChanged

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

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

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