I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Legacy:Pawn

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 :: Actor >> Pawn (Package: Engine)

See Pawn (UT) for the UT version of this class.

This is the parent class for all Controlled entities in the game engine, whether they are controlled by human players or AI. Their purpose is to represent the visual and physical elements of the entity, while the Controller class handles their decision making, Adrenaline, etc.

Properties[edit]

Main[edit]

byte DamageDirIntensity[4] 
HitFXData HitFx[8] 
float SkillModifier 
Skill modifier (same scale as game difficulty, 0 - 7)

AI[edit]

name AIScriptTag 
Tag of AIScript which should be associated with this pawn
float Alertness 
-1 to 1 ->Used within specific states for varying reaction to stimuli
bool bAdjacentZoneHearing 
Can hear any sound in adjacent zone (if close enough to hear)
bool bLOSHearing 
Can hear sounds from line-of-sight sources (which are close enough to hear)
bool bMuffledHearing 
Can hear sounds through walls (but muffled - sound distance increased to double plus 4x the distance through walls
float HearingThreshold 
Max distance at which a makenoise(1.0) loudness sound can be heard
float PeripheralVision 
Cosine of limits of peripheral vision.
float SightRadius 
Maximum seeing distance.

AnimTweaks[edit]

float BlendChangeTime 
Time to blend between movement animations

Shield[edit]

float ShieldStrength (transient) 
Current shielding (having been activated)

Hidden[edit]

name LandAnims[4] 
name TakeoffAnims[4] 
name AirAnims[4] 
name WalkAnims[4] 
name CrouchAnims[4] 
name DodgeAnims[4] 
name DoubleJumpAnims[4] 
float AccelRate 
Max acceleration rate
float AirControl 
Amount of AirControl available to the pawn
float AirSpeed 
The maximum flying speed.
name AirStillAnim 
NavigationPoint Anchor 
Current nearest path object.
name AnimAction 
Use for replicating anims
float AppliedBob 
float AvgPhysicsTime (const) 
Physics updating time monitoring (for AI monitoring reaching destinations)
float BackwardStrafeBias 
Bias of strafe blending in backward direction
bool bAmbientCreature 
AIs will ignore me
float BaseEyeHeight 
Base eye height above collision center.
float BaseMovementRate 
FIXME - temp - used for scaling movement
bool bAutoFire 
Used for third person weapon anims/effects
bool bAvoidLedges 
Don't get too close to ledges
bool bCachedRelevant 
Network relevancy caching flag
bool bCanClimbLadders 
bool bCanDoubleJump 
bool bCanFly 
bool bCanJump 
Movement capabilities - used by AI
bool bCanStrafe 
bool bCanSwim 
bool bCanWalk 
bool bClientCollision 
Used on clients when temporarily turning off collision
bool bCrawler 
Crawling - pitch and roll based on surface pawn is on
bool bDirectHitWall 
Always call pawn hitwall directly (no controller notifyhitwall)
bool bDoTorsoTwist 
bool bHideRegularHUD 
bool bInitializeAnimation 
bool bInvulnerableBody 
bool bIsCrouched (const) 
Set by physics to specify that pawn is currently crouched
bool bIsFemale 
bool bJumpCapable 
bool bJustLanded 
Used by eyeheight adjustment
class<Effects> BloodEffect 
bool bNoJumpAdjust 
Set to tell controller not to modify velocity of a jump/fall
bool bNoTeamBeacon 
Never display team beacon for this pawn
bool bNoVelocityUpdate (const) 
Used by C++ physics
bool bNoWeaponFiring 
float Bob (globalconfig) 
float bobtime 
bool bPhysicsAnimUpdate 
bool bPlayedDeath 
bool bReducedSpeed (const) 
Used by movement natives
bool bReverseRun (const) 
bool bRollToDesired 
Update roll when turning to desired rotation (normally false)
bool bSimGravityDisabled (const) 
Used on network clients
bool bSimulateGravity (const) 
Simulate gravity for this pawn on network clients when predicting position (true if pawn is walking or falling)
bool bSpecialHUD 
bool bSteadyFiring 
Used for third person weapon anims/effects
bool bThumped 
bool bTryToUnCrouch (const) 
When auto-crouch during movement, continually try to uncrouch
bool bUpAndOut 
Used by swimming
bool bUpdatingDisplay 
To avoid infinite recursion through inventory setdisplay
bool bWaitForAnim 
True if the pawn is playing an important non-looping animation (eg. landing/dodge) and doesn't feel like being interrupted
bool bWantsToCrouch 
If true crouched (physics will automatically reduce collision height to CrouchHeight)
bool bWarping 
Set when travelling through warpzone (so shouldn't telefrag)
bool bWasCrouched 
bool bWasOnGround 
bool bWasWalking 
bool bWeaponBob 
vector ConstantAcceleration 
Acceleration added to pawn when falling
Controller Controller 
class<AIController> ControllerClass 
Default class to use when pawn is controlled by AI (can be modified by an AIScript)
float CrouchedPct 
Percent of running speed that crouched walking speed is
float CrouchHeight 
CollisionHeight when crouching
float CrouchRadius 
CollisionRadius when crouching
name CrouchTurnLeftAnim 
name CrouchTurnRightAnim 
float DamageScaling 
float DesiredSpeed 
float DestinationOffset 
Used to vary destination over NavigationPoints
float DodgeSpeedFactor 
Dodge speed moved here so animation knows the diff between a jump and a dodge
float DodgeSpeedZ 
float FindAnchorFailedTime 
Last time a FindPath() attempt failed to find an anchor.
byte FlashCount 
Used for third person weapon anims/effects
vector Floor (const) 
Normal of floor pawn is standing on (only used by PHYS_Spider and PHYS_Walking)
int FootRot (const) 
Torso twisting/looking stuff
bool FootStill (const) 
bool FootTurning (const) 
float ForwardStrafeBias 
Bias of strafe blending in forward direction
float GroundSpeed 
The maximum ground speed.
name HeadBone 
float HeadScale 
PhysicsVolume HeadVolume 
Physics volume of head
int Health (travel) 
Health: 100 = normal maximum
float HealthMax 
class<DamageType> HitDamageType 
Damage type of last hit (for playing hit/death anims)
int HitFxTicker (transient) 
name IdleCrouchAnim 
name IdleRestAnim 
name IdleSwimAnim 
float IdleTime 
name IdleWeaponAnim 
WeaponAttachment code will set this one
float JumpZ 
Vertical acceleration w/ jump
float LadderSpeed 
Ladder climbing speed
float LandBob 
name LandMovementState 
A state of the PlayerController or a derived class which is applied when the player is not within a water block. This will in effect set the default movement state for the pawn.
NavigationPoint LastAnchor (const) 
Old nearest path object
float LastPainSound 
float LastPainTime 
Last time pawn played a takehit animation (updated in PlayHit())
PlayerController LastRealViewer 
PlayerStart LastStartSpot 
Used to avoid spawn camping
float LastStartTime 
float LastValidAnchorTime 
Last time a valid anchor was found
Actor LastViewer 
class<Effects> LowGoreBlood 
float MaxDesiredSpeed 
float MaxFallSpeed 
Max speed pawn can land without taking damage (also limits what paths AI can use)
float MeleeRange 
Max range for melee attack (not including collision radii)
string MenuName (localized) 
Name used for this pawn type in menus (e.g. player selection)
float MovementBlendStartTime 
Used for delaying the start of run blending
float NetRelevancyTime 
float NextPathRadius 
Radius of next path in route
float noise1loudness (const) 
All the noise* variables are for remembering the location and position of the last noises propagated.
Pawn noise1other (const) 
vector noise1spot (const) 
float noise1time (const) 
float noise2loudness (const) 
Pawn noise2other (const) 
vector noise2spot (const) 
float noise2time (const) 
vector OldAcceleration 
int OldAnimDir (const) 
EPhysics OldPhysics 
float OldRotYaw 
Used for determining if pawn is turning
vector OldVelocity (const) 
Velocity at last update
float OldZ 
Old Z height - used for eyeheight smoothing
LadderVolume OnLadder 
Ladder currently being climbed
CompressedPosition PawnPosition (transient) 
Weapon PendingWeapon 
Will become weapon once current weapon is put down
PlayerReplicationInfo PlayerReplicationInfo 
class<DamageType> ReducedDamageType 
Which damagetype this creature is protected from (used by AI)
name RootBone 
Powerups SelectedItem (travel) 
Currently selected inventory item
vector SerpentineDir 
Serpentine direction
float SerpentineDist 
float SerpentineTime 
How long to stay straight before strafing again
Projector Shadow 
float SoundDampening 
float SpawnTime 
name SpineBone1 
name SpineBone2 
float SplashTime 
Time of last splash
vector TakeHitLocation 
Location of last hit (for playing hit/death anims)
name TakeoffStillAnim 
array<name> TauntAnims 
Array of names of taunt anim that can be played by this character. First 4 assumed to be orders.
string TauntAnimNames[8] (localized) 
Text description of taunt anims
vector TearOffMomentum 
Momentum to apply when torn off (bTearOff == true)
int TurnDir (const) 
name TurnLeftAnim 
name TurnRightAnim 
Turning anims when standing in place (scaled by turn speed)
float UnCrouchTime (const) 
When auto-crouch during movement, continually try to uncrouch once this decrements to zero
float UnderWaterTime 
How much time pawn can go without air (in seconds)
byte ViewPitch 
Something to replicate so we can see which way remote clients are looking
vector WalkBob 
float WalkingPct 
Percent of running speed that walking speed is
name WaterMovementState 
A state of the PlayerController or a derived class which is applied when the player is within a water block.
float WaterSpeed 
The maximum swimming speed.
Weapon Weapon (travel) 
The pawn's current weapon.

Structs[edit]

struct HitFXData
{
    var() Name Bone :
    var() class<DamageType> damtype :
    var() bool bSever :
    var() Rotator rotDir :
}

Functions[edit]

SetTwistLook( int twist, int look ) (simulated, native) 
int Get4WayDirection() (simulated, native) 
bool ReachedDestination( Actor Goal) (native) 
returns true if the pawn has reached Goal.
ForceCrouch() (native) 
Forces the pawn to crouch.
Weapon GetDemoRecordingWeapon() (simulated) 
Fire( optional float F ) 
Fires the pawn's current weapon
DrawHUD( Canvas Canvas ) 
bool SpecialCalcView( out actor ViewActor, out vector CameraLocation, out rotator CameraRotation ) 
string GetHumanReadableName() (simulated) 
PlayTeleportEffect( bool bOut, bool bSound ) 
PossessedBy( Controller C ) 
Called when the pawn is possessed by a Controller
UnPossessed() 
Called when a Controller gives up control of the pawn.
bool PointOfView() (simulated) 
False means first person view, True means third person view.
BecomeViewTarget() 
DropToGround() 
bool CanGrabLadder() 
Returns true if this pawn can currently grab a ladder.
bool CanSplash() 
ClimbLadder( LadderVolume L ) 
Called when the pawn starts climbing a ladder.
EndClimbLadder( LadderVolume OldLadder ) 
Called when the pawn is done climbing a ladder.
DisplayDebug( Canvas Canvas, out float YL, out float YPos ) (simulated) 
This displays the debug information seen with the console command "showdebug"
vector CalcDrawOffset( Inventory Inv) (simulated) 
Compute offset for drawing an inventory item.
vector CameraShake() 
vector ModifiedPlayerViewOffset( Inventory Inv ) 
vector WeaponBob( float BobDamping ) 
CheckBob( float DeltaTime, vector Y ) 
bool IsPlayerPawn() (simulated) 
Returns true if this pawn is controlled by a player/bot.
bool WasPlayerPawn() (simulated) 
Returns true if this pawn was previously controlled by a player/bot.
bool IsHumanControlled() (simulated) 
Returns true if this pawn is being controlled by a human player.
bool IsLocallyControlled() (simulated) 
Returns true if this pawn is being controlled locally (by the computer calling the function).
bool IsFirstPerson() (simulated) 
Returns true if viewing this pawn in first person view.
rotator GetViewRotation() (simulated) 
SetViewRotation( rotator NewRotation ) (simulated) 
bool InGodMode() (final) 
Returns true if this pawn is in God mode (invulnerable)
bool NearMoveTarget() 
Returns true if pawn is near it's Controller's MoveTarget.
bool PressingFire() (simulated, final) 
bool PressingAltFire() (simulated, final) 
Actor GetMoveTarget() 
Returns the pawn's Controller's MoveTarget.
SetMoveTarget( Actor NewTarget) 
Sets the pawn's Controller's MoveTarget.
bool LineOfSightTo( Actor Other) 
rotator AdjustAim( Ammunition FiredAmmunition, vector projStart, int aimerror) (simulated, final) 
Actor ShootSpecial( Actor A) 
float AdjustedStrength() 
return a value (typically 0 to 1) adjusting pawn's perceived strength if under some special influence (like berserk)
HandlePickup( Pickup pick ) 
ReceiveLocalizedMessage( class<LocalMessage> Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject ) 
Trigger( Actor Other, Pawn EventInstigator) 
bool CanTrigger( Trigger T ) 
Returns true if the pawn can be triggered.
CreateInventory( string InventoryClassName ) 
Spawns an Inventory of class InventoryClassName and gives it to this pawn.
GiveWeapon( string aClassName ) 
SetDisplayProperties( ERenderStyle NewStyle, Material NewTexture, bool bLighting ) 
SetDefaultDisplayProperties() 
FinishedInterpolation() 
JumpOutOfWater( vector jumpDir ) 
Called to set the pawn's velocity and acceleration as he jumps out of water.
ShouldCrouch( bool Crouch ) 
Called by the pawn's Controller when it wants to crouch.
RestartPlayer() 
AddVelocity( vector NewVelocity ) 
KilledBy( Pawn EventInstigator ) 

Events[edit]

SetHeadScale( float NewScale ) (simulated) 
Sets the scaling of the head of the pawn (used in the BigHead mutator)
SetWalking( bool bNewIsWalking ) 
ClientMessage( coerce string S, optional Name Type ) 
ModifyVelocity( float DeltaTime, vector OldVelocity ) (simulated) 
called by physics before applying new velocity for this tick. Velocity,Acceleration, etc. have been updated by the physics, but location hasn't.
EndCrouch( float HeightAdjust ) 
Called by physics when the pawn begins crouching.
StartCrouch( float HeightAdjust ) 
Called by physics when the pawn ends crouching.
PlayDying( class<DamageType> DamageType, vector HitLoc ) (simulated) 
UT2004: This function seems to be called natively on clientside. It's ROLE on clientside seems to be set to ROLE_Authority before. Although there is a ClientDying() method in Pawn, it is overwritten in xPawn and does therefore NOT call the controller's ClientDying() which "could" call PlayDying(). Controller.PlayDying() is not simulated, it wouldn't be called anyways. Magic ladies and gentlemen.

Known Subclasses[edit]

Pawn
  +- RedeemerWarhead (UT200x)
  +- KVehicle (UT2003 only)
  +- Scout
  +- ScriptedPawn (UT only)
  +- UnrealPawn
  |   +- xIntroPawn >> (UT200x)
  |   +- xPawn (UT200x)
  |       +- Monster >>
  |       +- xMutantPawn (UT2004)
  +- Vehicle (UT2004 only) >>
      +- ASVehicle >>
      +- KVehicle >>
      +- ONSWeaponPawn >>
      +- SVehicle >>

Related Topics[edit]

Discussion[edit]

Mysterial: Whew! Even though the Class Wikifier did half the work, that still took a while! I'll get to the functions and other stuff later.

Eyaw_Nayr: This class is probably one of the most important in the game. We should include things like how to modify pawns, etc ... Essentially we just need more details.

mono_eric3: Am I correct in thinking the movement animations are handled natively? Does anyone know of a way to prevent them playing, or at least have some sort of input in what is played (apart from setting those default variables of course). It would be nice if this page could be extended to cover natives and what can be done about them in the pawn class.

SuperApe: Those default properties (MovementAnims, etc) combine with the UnrealPawn and xPawn properties to make the full list of available anims. Within Actor, bAnimOwner dictates whether the Owner is in charge of the animations. Controller.bControllAnimations dictatates that the controller is in charge, rather than the Pawn notifications. It seems you could prevent movement animations from playing (on a player) simply by removing the values from those Pawn (UnrealPawn and xPawn) animation properties. Marked up properties, functions, etc.

SuperApe: Is the property bRollToDesired obsolete or broken? Has anyone use this property set to True succesfully? While True, it seems to disable bRotateToDesired, at least with PHYS_Flying.