UE2:Controller (U2XMP)

From Unreal Wiki, The Unreal Engine Documentation Site
U2XMP Object >> Actor >> Controller
Package:
Engine
Direct subclass:
LicenseeController
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 AIControFllers 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.

This is a built-in Unreal class and it shouldn't be modified.

Constants

DeadState

Value: 'Dead'


GameEndedState

Value: 'GameEnded'


FearTimerName

Value: 'FearTimer'


Properties

Property group 'Controller'

PlayerReplicationInfoClass

Type: class<PlayerReplicationInfo>


Default value: Class'Engine.PlayerReplicationInfo'

Internal variables

See Controller internal variables.

Default values

Property Value
bHidden True
bHiddenEd True
RotationRate
Member Value
Pitch 3072
Roll 2048
Yaw 30000

Enums

EAttitude

ATTITUDE_Enemy
considered an enemy
ATTITUDE_Neutral
not considered a friend or enemy (but could go either way)
ATTITUDE_Friend
considered a friend
ATTITUDE_None
used for invalid situations (attitude to self, Pawn not set etc.)

EMoveResult

MR_Continue
0 used internally when still moving (hasn't timed out & hasn't reached destination & move still valid)
MR_TimeOut
1 MoveTimer ran out before reaching destination
MR_Error
2 invalid call to MoveToXXX or invalid situation (tbd)
MR_NoPawn
3 controller no longer has a pawn (tbd)
MR_DestinationInvalid
4 situation changed, e.g. fell past destination
MR_DestinationLost
5 MoveTarget destroyed/cleared (tbd)
MR_DestinationReached
6 reached given destination
MR_DestinationReachedFinal
7 reached given (final) destination
MR_DestinationReachedPending
8 used internally
MR_DestinationReachedFinalPending
9 used internally

EPathResult

PR_None
0 no path found
PR_Visible
1 goal is visible from end anchor (last actor in RouteCache)
PR_Reachable
2 goal is reachable from end anchor (last actor in RouteCache)
PR_Direct
3 goal is directly reachable from NPC's current location

EStopFiringInfo

SFI_None
no reason given
SFI_Behavior
called for behavior reasons (e.g. firing burst over)
SFI_NoLOS
NPC has no LOS to target/last seen position
SFI_NoShot
NPC doesn't have a shot from current location (e.g. no grenade trajectory, blocked)
SFI_Orientation
NPC facing away from target
SFI_OutOfRange
target is out of range
SFI_TargetInvalid
target is no longer valid (e.g. dead)
SFI_Timeout
too long since target was last seen (e.g. stop firing at last seen position)
SFI_WeaponRating
rating for weapon is ineffective / dangerous
SFI_WeaponReload
reloading weapon
SFI_WeaponSwitch
changing weapon

Structs

TFearLocationInfo

Modifiers: native

Object.Vector Location
float ExpireTime

Functions

See Controller functions.

States

@DeadState

Ignores: HearNoise, KilledBy, SeeAlertFriend, SeeEnemy, SeeFriend, SeeOther

@DeadState.PawnDied

function PawnDied ()

Overrides: PawnDied (global)


@DeadState.ServerReStartPlayer

function ServerReStartPlayer ()

Overrides: ServerReStartPlayer (global)


@GameEndedState

Ignores: BeginFalling, HearNoise, KilledBy, NotifyBump, NotifyHeadVolumeChange, NotifyHitWall, NotifyPhysicsVolumeChange, SeeAlertFriend, SeeEnemy, SeeFriend, SeeOther, ShotFiredNotification, TakeDamage

@GameEndedState.BeginState

event BeginState ()

Overrides: Object.BeginState (global)