UE2:Controller (UT2004)
- Package:
- Engine
- Direct subclasses:
- AIController, PlayerController
- This class in other games:
Controller, the base class of players or AI.
Controllers are non-physical actors that can be attached to a Pawn to control its actions. PlayerControllers are used by human players to control pawns, while AIControllers implement the artificial intelligence for the pawns they control. Controllers take control of a pawn using their Possess() method, and relinquish control of the pawn by calling UnPossess().
Controllers receive notifications for many of the events occuring for the Pawn they are controlling. This gives the controller the opportunity to implement the behavior in response to this event, intercepting the event and superceding the Pawn's default behavior.
Constants
LATENT_MOVETOWARD
Value: 503
InLatentExecution() number for MoveToward() function.
Properties
Property group 'Controller'
PlayerReplicationInfoClass
Type: class<PlayerReplicationInfo>
This controller's default type of PlayerReplicationInfo. Note that certain game types, e.g. Onslaught and Assault, override this property through their default mutators, e.g. ONSDefaultMut and ASMutator.
Default value: Class'Engine.PlayerReplicationInfo'
Internal variables
See Controller internal variables.
Default values
Property | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
bHidden | True | ||||||||
bHiddenEd | True | ||||||||
bOnlyRelevantToOwner | True | ||||||||
RemoteRole | ROLE_None | ||||||||
RotationRate |
|
Functions
Latent functions
FinishRotation
Waits until the controlled Pawn's Rotation.Yaw reaches the DesiredRotation.Yaw ± 2000URU (about 11 degrees), or no longer controlling a Pawn.
MoveTo
Sets up the Pawn to move towards the specified location, optionally specifying a focus actor the Pawn should face during the move. Template:SetWalking() is called if Pawn.bIsWalking doesn't match the bShouldWalk parameter.
The function determines the approximate movement time required to reach the target and sets MoveTimer accordingly. Then it waits until either the MoveTimer drops below zero (it is counted down automatically, but can also be set from UnrealScript) or the Pawn starts falling, e.g. due to getting thrown into the air by weapon fire.
MoveToward
Sets up the Pawn to move towards the specified actor, optionally specifying a focus actor the Pawn should face during the move. Template:SetWalking() is called if Pawn.bIsWalking doesn't match the bShouldWalk parameter.
If the target actor is a NavigationPoint and either has bSpecialMove set to True
, its SuggestMovePreparation() function is called.
That function is also called if the target NavigationPoint is reached via a forced path and has bSpecialForced set to True
. Otherwise PrepareForMove() or Controller events.MayDodgeToMoveTarget() is called to prepare for the move.
The function determines the approximate movement time required to reach the target and sets MoveTimer accordingly. Then it waits until either the MoveTimer drops below zero (it is counted down automatically, but can also be set from UnrealScript) or the Pawn starts falling, e.g. due to getting thrown into the air by weapon fire, or the MoveTarget is cleared.
WaitForLanding
If the controlled Pawn is in falling physics, this function waits until the Pawn changes to another physics type. If falling lasts more than four seconds, LongFall() is called every tick until either GotoState() is used to stop latent function execution or the Pawn landed.
Exec functions
SwitchToBestWeapon
Native functions
actorReachable
AddController
CanMakePathTo
CanSee
EAdjustJump
EndClimbLadder
FindBestInventoryPath
FindBestSuperPickup
FindPathTo
FindPathToIntercept
FindPathToward
FindPathTowardNearest
FindRandomDest
InLatentExecution
LineOfSightTo
PickAnyTarget
PickTarget
PickWallAdjust
pointReachable
RemoveController
StopWaiting
Events
See Controller events.
Other instance functions
See Controller instance functions.
States
Dead
Ignores: HearNoise, KilledBy, SeePlayer
Dead.PawnDied
Overrides: PawnDied (global)
Dead.ServerReStartPlayer
Overrides: ServerReStartPlayer (global)
GameEnded
Ignores: Falling, HearNoise, HitWall, KilledBy, NotifyBump, NotifyHeadVolumeChange, NotifyPhysicsVolumeChange, ReceiveWarning, SeePlayer, TakeDamage
GameEnded.BeginState
Overrides: Object.BeginState (global)
RoundEnded
Ignores: Falling, HearNoise, HitWall, KilledBy, NotifyBump, NotifyHeadVolumeChange, NotifyPhysicsVolumeChange, ReceiveWarning, SeePlayer, TakeDamage
RoundEnded.BeginState
Overrides: Object.BeginState (global)