Always snap to grid
UE3:Pawn (UT3)
From Unreal Wiki, The Unreal Engine Documentation Site
- Package:
- Engine
- Direct subclasses:
- GamePawn, Scout, Vehicle
- This class in other games:
- RTNP, U1, U2, U2XMP, UDK, UE2Runtime, UT, UT2003, UT2004
Pawn, the base class of all actors that can be controlled by players or AI.
Pawns are the physical representations of players and creatures in a level. Pawns have a mesh, collision, and physics. Pawns can take damage, make sounds, and hold weapons and other inventory. In short, they are responsible for all physical interaction between the player or AI and the world.
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
[edit] Properties
[edit] Property group 'AI'
[edit] Alertness
Type: float
-1 to 1 ->Used within specific states for varying reaction to stimuli
[edit] bDontPossess
Type: bool
if true, Pawn won't be possessed at game start
[edit] bLOSHearing
Type: bool
Default value: True
[edit] bMuffledHearing
Type: bool
can hear sounds through walls (but muffled - sound distance increased to double plus 4x the distance through walls
[edit] HearingThreshold
Type: float
max distance at which a makenoise(1.0) loudness sound can be heard
Default value: 2800.0
[edit] PeripheralVision
Type: float
Cosine of limits of peripheral vision.
[edit] SightRadius
Type: float
Maximum seeing distance.
Default value: 5000.0
[edit] Property group 'Camera'
[edit] BaseEyeHeight
Type: float
Base eye height above collision center.
Default value: 64.0
[edit] EyeHeight
Type: float
Current eye height, adjusted for bobbing and stairs.
Default value: 54.0
[edit] Property group 'Pawn'
[edit] bCanCrouch
Type: bool
if true, this pawn is capable of crouching
[edit] Health
Type: int
Default value: 100
[edit] HealthMax
Type: int
amount of health this Pawn has
[edit] Mesh
Type: SkeletalMeshComponent
[edit] RBPushRadius
Type: float
Unreal units
Default value: 10.0
[edit] RBPushStrength
Type: float
Default value: 50.0
[edit] VehicleCheckRadius
Type: float
Radius that is checked for nearby vehicles when pressing use
Default value: 150.0
[edit] ViewPitchMax
Type: float
Default value: 16383.0
[edit] ViewPitchMin
Type: float
Default value: -16384.0
[edit] Weapon
Type: Weapon
Weapon currently held by Pawn
[edit] Internal variables
[edit] Default values
| Property | Value | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| bBlockActors | True | ||||||||
| bCanBeDamaged | True | ||||||||
| bCanTeleport | True | ||||||||
| bCollideActors | True | ||||||||
| bCollideWorld | True | ||||||||
| bProjTarget | True | ||||||||
| bShouldBaseAtStartup | True | ||||||||
| bUpdateSimulatedPosition | True | ||||||||
| CollisionComponent | CylinderComponent'CollisionCylinder' | ||||||||
| CollisionType | COLLIDE_CustomDefault | ||||||||
| Components[0] | SpriteComponent'Sprite' | ||||||||
| Components[1] | CylinderComponent'CollisionCylinder' | ||||||||
| Components[2] | ArrowComponent'Arrow' | ||||||||
| NetPriority | 2.0 | ||||||||
| RemoteRole | ROLE_SimulatedProxy | ||||||||
| RotationRate |
|
[edit] Subobjects
[edit] Arrow
Class: Engine.ArrowComponent
| Property | Value | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ArrowColor |
|
[edit] CollisionCylinder
Class: Engine.CylinderComponent
| Property | Value |
|---|---|
| BlockActors | True |
| CollideActors | True |
| CollisionHeight | 78.0 |
| CollisionRadius | 34.0 |
[edit] Sprite
Class: Engine.SpriteComponent
| Property | Value |
|---|---|
| AlwaysLoadOnClient | False |
| AlwaysLoadOnServer | False |
| HiddenGame | True |
[edit] Enums
[edit] EPathSearchType
- PST_Default
- PST_Breadth
- PST_NewBestPathTo
[edit] Functions
[edit] Native functions
[edit] ForceCrouch
[edit] GetBestAnchor
[edit] GetBoundingCylinder
Overrides: Actor.GetBoundingCylinder
[edit] GetTeamNum
Overrides: Actor.GetTeamNum
[edit] GetVehicleBase
[edit] InitRagdoll
Does the following: - Assign the SkeletalMeshComponent 'Mesh' to the CollisionComponent - Call InitArticulated on the SkeletalMeshComponent. - Change the physics mode to PHYS_RigidBody
[edit] IsHumanControlled
IsHumanControlled() return true if controlled by a real live human on the local machine. On client, only local player's pawn returns true
[edit] IsInvisible
Returns:
- true if pawn is invisible to AI
[edit] IsLocallyControlled
IsLocallyControlled() return true if controlled by local (not network) player
[edit] IsPlayerPawn
IsPlayerPawn() return true if controlled by a Player (AI or human) on local machine (any controller on server, localclient's pawn on client)
[edit] IsValidEnemyTargetFor
Returns if this is a valid enemy for PRI. Checks things like whether the Pawn is alive, teammates, etc. Works on clients and servers.
Native implementation:
UBOOL APawn::IsValidEnemyTargetFor(const APlayerReplicationInfo* OtherPRI, UBOOL bNoPRIIsEnemy) const { // only am valid target if not dead, and not driving a vehicle if ( bDeleteMe || (Health <=0) || DrivenVehicle ) { return FALSE; } if ( !PlayerReplicationInfo ) { return bNoPRIIsEnemy; } // and not on same team, or neither is on a team (which implies not a team game) return !OtherPRI || !PlayerReplicationInfo->Team || (PlayerReplicationInfo->Team != OtherPRI->Team); }
[edit] IsValidTargetFor
returns if we are a valid enemy for C checks things like whether we're alive, teammates, etc server only; always returns false on clients
Obsolete:
- Use IsValidEnemyTargetFor() instead!
[edit] ReachedDestination
[edit] ReachedPoint
[edit] SetAnchor
[edit] SetPushesRigidBodies
[edit] SetRemoteViewPitch
Set Pawn ViewPitch, so we can see where remote clients are looking.
Parameters:
- NewRemoteViewPitch - Pitch component to replicate to remote (non owned) clients.
[edit] SuggestJumpVelocity
SuggestJumpVelocity() returns true if succesful jump from start to destination is possible returns a suggested initial falling velocity in JumpVelocity Uses GroundSpeed and JumpZ as limits
[edit] TermRagdoll
the opposite of InitRagdoll(); resets CollisionComponent to the default, sets physics to PHYS_Falling, and calls TermArticulated() on the SkeletalMeshComponent
Returns:
- true on success, false if there is no Mesh, the Mesh is not in ragdoll, or we're otherwise not able to terminate the physics
[edit] ValidAnchor
Is the current anchor valid?
[edit] Events
See Pawn events.
[edit] Other instance functions
[edit] States
[edit] Dying
Ignores: BreathTimer, Bump, Falling, FellOutOfWorld, HeadVolumeChange, HitWall, PhysicsVolumeChange
[edit] Dying.BaseChange
Overrides: BaseChange (global)
Event called after actor's base changes.
[edit] Dying.BeginState
Overrides: Object.BeginState (global)
Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).
[edit] Dying.Landed
Overrides: Landed (global)
[edit] Dying.OutsideWorldBounds
Overrides: OutsideWorldBounds (global)
(Description copied from Actor.OutsideWorldBounds)
called when the Actor is outside the hard limit on world bounds
Note: physics and collision are automatically turned off after calling this function
[edit] Dying.TakeDamage
Overrides: TakeDamage (global)
(Description copied from Actor.TakeDamage)
apply some amount of damage to this actor
Parameters:
- Damage - the base damage to apply
- EventInstigator - the Controller responsible for the damage
- HitLocation - world location where the hit occurred
- Momentum - force caused by this hit
- DamageType - class describing the damage that was done
- HitInfo - additional info about where the hit occurred
- DamageCauser - the Actor that directly caused the damage (i.e. the Projectile that exploded, the Weapon that fired, etc)
[edit] Dying.Timer
Overrides: Actor.Timer (global)
[edit] Dying.Died
Overrides: Died (global)
(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
[edit] Dying.PlayNextAnimation
[edit] Dying.PlayWeaponSwitch
Overrides: PlayWeaponSwitch (global)
(Description copied from Pawn.PlayWeaponSwitch)
Player just changed weapon. Called from InventoryManager::ChangedWeapon(). Network: Local Player and Server.
Parameters:
- OldWeapon - Old weapon held by Pawn.
- NewWeapon - New weapon held by Pawn.
