Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE3:UTPlayerController instance functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Contents

UTPlayerController instance functions in other games:
UT3
Other member categories for this class:
constants, exec functions, internal variables, states

Instance functions

AcknowledgePossession

function AcknowledgePossession (Pawn P)

Overrides: PlayerController.AcknowledgePossession


AddOnlineDelegates

function AddOnlineDelegates (bool bRegisterVoice)

Sets online delegates to respond to for this PC.

AdjustFOV

function AdjustFOV (float DeltaTime)

Overrides: PlayerController.AdjustFOV

Called each frame from PlayerTick this function is used to transition towards the DesiredFOV if not already at it.

Parameters:

  • DeltaTime - Time since last update

AdjustPersistentKey

function AdjustPersistentKey (UTSeqAct_AdjustPersistentKey InAction)


AdminCmdOk

function bool AdminCmdOk ()

Admin functions

AimHelpModifier

function float AimHelpModifier ()

Returns:

the a scaling factor for the distance from the collision box of the target to accept aiming help (for instant hit shots)

AimingHelp

function bool AimingHelp (bool bInstantHit)

Overrides: PlayerController.AimingHelp


AllowTextMessage

function bool AllowTextMessage (string Msg)

Overrides: PlayerController.AllowTextMessage


AllowTTSMessageFrom

simulated private function bool AllowTTSMessageFrom (PlayerReplicationInfo PRI)


AlreadyInActionMusic

function bool AlreadyInActionMusic ()

return true if music manager is already playing action track return true if no music manager (no need to tell non-existent music manager to change tracks

AtuallyShowQuickPickMenu

function AtuallyShowQuickPickMenu ()

This will show the QuickPick Menu! *

BullseyeMessage

function BullseyeMessage ()


CallServerMove

function CallServerMove (SavedMove NewMove, Object.Vector ClientLoc, byte ClientRoll, int View, SavedMove OldMove)

Overrides: PlayerController.CallServerMove


CanCommunicate

simulated private function bool CanCommunicate ()


CanRestartPlayer

function bool CanRestartPlayer ()

Overrides: PlayerController.CanRestartPlayer


CharacterProcessingComplete

function CharacterProcessingComplete ()

called when the GRI finishes processing custom character meshes

CheckAutoObjective

function CheckAutoObjective (bool bOnlyNotifyDifferent)

attempts to find an objective for the player to complete depending on their settings and tells the player about it

Parameters:

  • bOnlyNotifyDifferent - if true, only send messages to the player if the selected objective is different from the previous one

Note: needs to be called on the server, not the client (because that's where the AI is)

CheckBulletWhip

function CheckBulletWhip (SoundCue BulletWhip, Object.Vector FireLocation, Object.Vector FireDir, Object.Vector HitLocation)


CheckJumpOrDuck

function CheckJumpOrDuck ()

Overrides: PlayerController.CheckJumpOrDuck


CheckPickedVehicle

function UTVehicle CheckPickedVehicle (UTVehicle V, bool bEnterVehicle)

returns the Vehicle passed in if it can be driven

CheckVehicleToDrive

function UTVehicle CheckVehicleToDrive (bool bEnterVehicle)

Returns vehicle which can be driven

Parameters:

  • bEnterVehicle - if true then player enters the found vehicle

CleanupOnlineSubsystemSession

function bool CleanupOnlineSubsystemSession (bool bWasFromMenu)

Cleans up online subsystem game sessions and posts stats if the match is arbitrated.

ClearCameraEffect

function ClearCameraEffect ()


ClearStringAliasBindingMapCache

simulated function ClearStringAliasBindingMapCache ()

Clear the contents of the command to bind key cache

ClientBecameActivePlayer

reliable client function ClientBecameActivePlayer ()


ClientEndZoom

reliable simulated client function ClientEndZoom ()

Allows the server to tell the client to end zoom

ClientGameEnded

reliable client function ClientGameEnded (optional Actor EndGameFocus, optional bool bIsWinner)

Overrides: PlayerController.ClientGameEnded


ClientMusicEvent

unreliable client function ClientMusicEvent (int EventIndex)


ClientPawnDied

reliable client simulated function ClientPawnDied ()

Client-side notification that the pawn has died.

ClientPlayAnnouncement

reliable client function ClientPlayAnnouncement (class<UTLocalMessageInMessageClass, int MessageIndex, optional PlayerReplicationInfo PRI, optional Object OptionalObject)


ClientPlayTakeHit

unreliable client function ClientPlayTakeHit (Object.Vector HitLoc, byte Damage, class<DamageTypeDamageType)


ClientReset

reliable client function ClientReset ()

Overrides: PlayerController.ClientReset


ClientRestart

reliable client function ClientRestart (Pawn NewPawn)

Overrides: PlayerController.ClientRestart


ClientRoundEnded

reliable client function ClientRoundEnded (Actor EndRoundFocus)


ClientSetAutoObjective

reliable client function ClientSetAutoObjective (Actor NewAutoObjective)

client-side notification of the current auto objective

ClientSetBehindView

reliable client function ClientSetBehindView (bool bNewBehindView)


ClientSetOnlineStatus

reliable client function ClientSetOnlineStatus ()

Overrides: PlayerController.ClientSetOnlineStatus

Looks at the current game state and uses that to set the rich presence strings

Licensees should override this in their player controller derived class

ClientSetRequestedEntryWithFlag

reliable client function ClientSetRequestedEntryWithFlag (UTVehicle V, bool bNewValue, int MessageIndex)

sets bRequestedEntryWithFlag on the given vehicle to update the HUD

ClientSetSpeechRecognitionObject

reliable client function ClientSetSpeechRecognitionObject (SpeechRecognition NewRecognitionData)


ClientSpawnCameraEffect

unreliable client function ClientSpawnCameraEffect (class<UTEmitCameraEffectCameraEffectClass)

Spawn ClientSide Camera Effects *

DamageShake

function DamageShake (int Damage, class<DamageTypeDamageType)

Causes a view shake based on the amount of damage Should only be called on the owning client

DisplayDebug

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)

Overrides: PlayerController.DisplayDebug

(Description copied from PlayerController.DisplayDebug)
list important PlayerController 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.

DrawHUD

function DrawHUD (HUD H)

Overrides: PlayerController.DrawHUD

Hook called from HUD actor. Gives access to HUD and Canvas

EndZoom

simulated function EndZoom ()

This function will end a zoom and reset the FOV to the default value

EndZoomNonlinear

simulated function EndZoomNonlinear (float ZoomInterpSpeed)

Ends a zoom, but interpolates nonlinearly back to the default value.

FindVehicleToDrive

function bool FindVehicleToDrive ()

Overrides: PlayerController.FindVehicleToDrive

Tries to find a vehicle to drive within a limited radius. Returns true if successful

FinishQuitToMainMenu

function FinishQuitToMainMenu ()

Called after onlinesubsystem game cleanup has completed.

FixFOV

function FixFOV ()

Overrides: PlayerController.FixFOV


GetAdjustedAimFor

function Object.Rotator GetAdjustedAimFor (Weapon W, Object.Vector StartFireLoc)

Overrides: PlayerController.GetAdjustedAimFor

Adjusts weapon aiming direction. Gives controller a chance to modify the aiming of the pawn. For example aim error, auto aiming, adhesion, AI help... Requested by weapon prior to firing. UTPlayerController implementation doesn't adjust aim, but sets the shottarget (for warning enemies)

Parameters:

  • W - weapon about to fire
  • StartFireLoc - world location of weapon fire start trace, or projectile spawn loc.
  • BaseAimRot - original aiming rotation without any modifications.

HasPersistentKey

function bool HasPersistentKey (UTProfileSettings.ESinglePlayerPersistentKeys SearchKey)


LandingShake

simulated function bool LandingShake ()

Overrides: Controller.LandingShake

LandingShake() returns true if controller wants landing view shake

LoadCharacterFromProfile

function LoadCharacterFromProfile (UTProfileSettings Profile)

Loads the player's custom character from their profile.

LoadSettingsFromProfile

function LoadSettingsFromProfile (bool bLoadCharacter)


LongClientAdjustPosition

unreliable client function LongClientAdjustPosition (float TimeStamp, name NewState, Actor.EPhysics NewPhysics, float NewLocX, float NewLocY, float NewLocZ, float NewVelX, float NewVelY, float NewVelZ, Actor NewBase, float NewFloorX, float NewFloorY, float NewFloorZ)

Overrides: PlayerController.LongClientAdjustPosition


NotifyInviteFailed

function NotifyInviteFailed ()

Overrides: PlayerController.NotifyInviteFailed

Override to display a message to the user

NotifyNotAllPlayersCanJoinInvite

function NotifyNotAllPlayersCanJoinInvite ()

Overrides: PlayerController.NotifyNotAllPlayersCanJoinInvite

Override to display a message to the user

NotifyNotEnoughSpaceInInvite

function NotifyNotEnoughSpaceInInvite ()

Overrides: PlayerController.NotifyNotEnoughSpaceInInvite

Override to display a message to the user

NotifyTakeHit

function NotifyTakeHit (Controller InstigatedBy, Object.Vector HitLocation, int Damage, class<DamageTypedamageType, Object.Vector Momentum)

Overrides: PlayerController.NotifyTakeHit

Notification from pawn that it has received damage via TakeDamage().

OnConnectionStatusChange

function OnConnectionStatusChange (OnlineSubsystem.EOnlineServerConnectionStatus ConnectionStatus)

Called when a system level connection change notification occurs. If we are playing a Live match, we may need to notify and go back to the menu. Otherwise silently ignore this.

Parameters:

  • ConnectionStatus - the new connection status.

OnControllerChanged

function OnControllerChanged (int ControllerId, bool bIsConnected)

Overrides: PlayerController.OnControllerChanged

Attempts to pause/unpause the game when a controller becomes disconnected/connected

Parameters:

  • ControllerId - the id of the controller that changed
  • bIsConnected - whether the controller is connected or not

OnDestroyOnlineGameComplete

function OnDestroyOnlineGameComplete (name SessionName, bool bWasSuccessful)

Called when the destroy online game has completed. At this point it is safe to travel back to the menus

Parameters:

  • SessionName - the name of the session the event is for
  • bWasSuccessful - whether it worked ok or not

OnEndOnlineGameComplete

function OnEndOnlineGameComplete (name SessionName, bool bWasSuccessful)

Called when the online game has finished ending.

OnFriendInviteReceived

function OnFriendInviteReceived (byte LocalUserNum, OnlineSubsystem.UniqueNetId RequestingPlayer, string RequestingNick, string Message)

Callback for when a friend request has been received.

OnFriendMessageReceived

function OnFriendMessageReceived (byte LocalUserNum, OnlineSubsystem.UniqueNetId SendingPlayer, string SendingNick, string Message)

Called when a friend invite arrives for a local player

Parameters:

  • LocalUserNum - the user that is receiving the invite
  • SendingPlayer - the player sending the friend request
  • SendingNick - the nick of the player sending the friend request
  • Message - the message to display to the recipient

Returns:

true if successful, false otherwise

OnGameInviteReceived

function OnGameInviteReceived (byte LocalUserNum, string RequestingNick)

Callback for when a game invite has been received.

OnLinkStatusChanged

function OnLinkStatusChanged (bool bConnected)

Called when the platform's network link status changes. If we are playing a match on a remote server, we need to go back to the front end menus and notify the player.

OnPlayCameraAnim

function OnPlayCameraAnim (UTSeqAct_PlayCameraAnim InAction)


OnReadProfileSettingsComplete

function OnReadProfileSettingsComplete (byte LocalUserNum, bool bWasSuccessful)

Callback for when the profile finishes reading for this PC.

OnStopCameraAnim

function OnStopCameraAnim (UTSeqAct_StopCameraAnim InAction)


OnUpdatePropertyFOVAngle

function OnUpdatePropertyFOVAngle ()

called through camera anim code when it modifies FOVAngle

OpenUIScene

simulated function UIScene OpenUIScene (UIScene Template)

Attempts to open a UI Scene.

Parameters:

  • Template - The Template of the scene to open.

Returns:

the opened scene

PawnDied

function PawnDied (Pawn P)

Overrides: PlayerController.PawnDied


PerformedUseAction

simulated function bool PerformedUseAction ()

Overrides: PlayerController.PerformedUseAction

return true if player the Use action was handled

PlayAnnouncement

function PlayAnnouncement (class<UTLocalMessageInMessageClass, int MessageIndex, optional PlayerReplicationInfo PRI, optional Object OptionalObject)


PlayBeepSound

simulated function PlayBeepSound ()

Overrides: PlayerController.PlayBeepSound


PlayCameraAnim

function PlayCameraAnim (CameraAnim AnimToPlay, optional float Scale, optional float Rate, optional float BlendInTime, optional float BlendOutTime, optional bool bLoop, optional bool bIsDamageShake)

plays the specified camera animation with the specified weight (0 to 1) local client only

PlayHeartbeat

function PlayHeartbeat ()


PlayStartupMessage

reliable client function PlayStartupMessage (byte StartupStage)


PlayWinMessage

function PlayWinMessage (bool bWinner)


ProjectileWarningTimer

function ProjectileWarningTimer ()


PulseTeamColor

function PulseTeamColor ()

Called from the UTTeamGameMessage, this will cause all TeamColored Images on the hud to pulse.

QuitToMainMenu

function QuitToMainMenu ()

Called when returning to the main menu.

ReceiveBotVoiceMessage

unreliable client function ReceiveBotVoiceMessage (UTPlayerReplicationInfo SenderPRI, int MessageIndex, Object LocationObject)

Receive a voice message from a bot - process locally, since character may be different on client

ReceiveProjectileWarning

function ReceiveProjectileWarning (Projectile proj)

Overrides: Controller.ReceiveProjectileWarning


RegisterCustomPlayerDataStores

simulated protected function RegisterCustomPlayerDataStores ()

Overrides: PlayerController.RegisterCustomPlayerDataStores

Creates and initializes the "PlayerOwner" and "PlayerSettings" data stores. This function assumes that the PlayerReplicationInfo for this player has not yet been created, and that the PlayerOwner data store's PlayerDataProvider will be set when the PRI is registered.

Overloaded so we can initialize game specific player data stores.

RemoveCameraEffect

function RemoveCameraEffect (UTEmitCameraEffect CamEmitter)

Parameters:

  • CamEmitter - Clear the CameraEffect if it is the one passed in

Restart

function Restart (bool bVehicleTransition)

Overrides: PlayerController.Restart


RoundHasEnded

function RoundHasEnded (optional Actor EndRoundFocus)

Overrides: Controller.RoundHasEnded


SaveProfile

function UTUIScene_SaveProfile SaveProfile (optional int PlayerIndex)

Saves the current profile complete with UI scene

SaveServerToHistory

function SaveServerToHistory ()

Saves the UniqueNetId for the current server to the player's list of recently visited servers (server history).

SendMessage

function SendMessage (PlayerReplicationInfo Recipient, name MessageType, float Wait, optional class<DamageTypeDamageType)

Overrides: Controller.SendMessage


ServerAdmin

reliable server function ServerAdmin (string CommandLine)


ServerAdminLogin

reliable server function ServerAdminLogin (string Password)


ServerAdminLogOut

reliable server function ServerAdminLogOut ()


ServerBecomeActivePlayer

reliable server function ServerBecomeActivePlayer ()


ServerChangeMap

reliable server function ServerChangeMap (string URL)


ServerChangeTeam

reliable server function ServerChangeTeam (int N)

Overrides: PlayerController.ServerChangeTeam

Don't allow team changes if we are in single player, or too frequently

ServerDropFlag

reliable server function ServerDropFlag ()


ServerForceTextMute

reliable server function ServerForceTextMute (string TargetPlayer)


ServerForceTextUnMute

reliable server function ServerForceTextUnMute (string TargetPlayer)


ServerForceVoiceMute

reliable server function ServerForceVoiceMute (string TargetPlayer)


ServerForceVoiceUnMute

reliable server function ServerForceVoiceUnMute (string TargetPlayer)


ServerKickBan

reliable server function ServerKickBan (string PlayerToKick, bool bBan)

Allows the local player or admin to kick a player

ServerPlayerPreferences

reliable server function ServerPlayerPreferences (EWeaponHand NewWeaponHand, bool bNewAutoTaunt, bool bNewCenteredWeaponFire, EAutoObjectivePreference NewAutoObjectivePreference, UTProfileSettings.EUTVehicleControls NewVehicleControls)


ServerPlayVehicleHorn

unreliable server function ServerPlayVehicleHorn ()


ServerProcessSpeechRecognition

reliable server function ServerProcessSpeechRecognition (OnlineSubsystem.SpeechRecognizedWord ReplicatedWords[3])


ServerRestartMap

reliable server function ServerRestartMap ()


ServerSay

unreliable server function ServerSay (string Msg)

Overrides: PlayerController.ServerSay


ServerSetAutoTaunt

reliable server function ServerSetAutoTaunt (bool Value)


ServerSetCharacterClass

reliable server function ServerSetCharacterClass (class<UTFamilyInfoCharClass)

tells the server about the character this player is using

ServerSetClanTag

reliable server function ServerSetClanTag (string InClanTag)

Sets the ClanTag for this player.

Parameters:

  • InClanTag - New clan tag for the player.

ServerSetHand

reliable server function ServerSetHand (EWeaponHand NewWeaponHand)


ServerShowPathToBase

reliable server function ServerShowPathToBase (byte TeamNum)


ServerSpectate

function ServerSpectate ()


ServerTeamSay

unreliable server function ServerTeamSay (string Msg)

Overrides: PlayerController.ServerTeamSay


ServerThrowWeapon

reliable server function ServerThrowWeapon ()

Overrides: PlayerController.ServerThrowWeapon


ServerUse

unreliable server function ServerUse ()

Overrides: PlayerController.ServerUse

Limit use frequency

ServerViewingMap

server reliable function ServerViewingMap (bool bNewValue)


ServerViewObjective

unreliable server function ServerViewObjective ()


ServerViewPlayerByName

unreliable server function ServerViewPlayerByName (string PlayerName)


ServerViewSelf

unreliable server function ServerViewSelf (optional Camera.ViewTargetTransitionParams TransitionParams)

Overrides: PlayerController.ServerViewSelf


SetAutoObjective

function SetAutoObjective (Actor ObjectiveActor, bool bOnlyNotifyDifferent)


SetBehindView

function SetBehindView (bool bNewBehindView)


SetCameraAnimStrength

function SetCameraAnimStrength (float NewStrength)

Allows changing camera anim strength on the fly

SetCameraMode

function SetCameraMode (name NewCamMode)

Overrides: PlayerController.SetCameraMode

Set new camera mode

Parameters:

  • NewCamMode - new camera mode.

SetHand

function SetHand (EWeaponHand NewWeaponHand)


SetViewTarget

function SetViewTarget (Actor NewViewTarget, optional Camera.ViewTargetTransitionParams TransitionParams)

Overrides: PlayerController.SetViewTarget


ShortServerMove

unreliable server function ShortServerMove (float TimeStamp, Object.Vector ClientLoc, byte NewFlags, byte ClientRoll, int View)


ShowMidGameMenu

function UTUIScene_MidGameMenu ShowMidGameMenu (optional name TabTag, optional bool bEnableInput)


ShowScoreboard

function ShowScoreboard ()


SpawnCamera

function SpawnCamera ()


SpeechRecognitionComplete

function SpeechRecognitionComplete ()

set to VoiceInterface's speech recognition delegate; called when words are recognized

StartZoom

simulated function StartZoom (float NewDesiredFOV, float NewZoomRate)

This function will cause the PlayerController to begin zooming to a new FOV Level.

Parameters:

  • NewDesiredFOV - The new FOV Value to head towards
  • NewZoomRate - The rate of transition in degrees per second

StartZoomNonlinear

simulated function StartZoomNonlinear (float NewDesiredFOV, float NewZoomInterpSpeed)


StopCameraAnim

function StopCameraAnim (optional bool bImmediate)

Stops the currently playing camera animation.

StopHeartBeat

function StopHeartBeat ()


StopViewShaking

function StopViewShaking ()

Turns off any view shaking

StopZoom

simulated function StopZoom ()

This function will stop the zooming process keeping the current FOV Angle

TriggerInteracted

simulated function bool TriggerInteracted ()

Overrides: PlayerController.TriggerInteracted

Examines the nearby enviroment and generates a priority sorted list of interactable actors, and then attempts to activate each of them until either one was successfully activated, or no more actors are available.

Typing

function Typing (bool bTyping)


UnregisterPlayerDataStores

simulated function UnregisterPlayerDataStores ()

Overrides: PlayerController.UnregisterPlayerDataStores

Unregisters the "PlayerOwner" data store for this player. Called when this PlayerController is destroyed.

Overloaded so we can unregister game specific player data stores.

UpdateRotation

function UpdateRotation (float DeltaTime)

Overrides: PlayerController.UpdateRotation


UpdateSex

function UpdateSex ()

Overrides: Controller.UpdateSex

Sex is set when mesh is set for pawn

UpdateVolumeAndBrightness

function UpdateVolumeAndBrightness ()

Updates sound volumes and screen brightness. Done in a seperate function so it can be called by the sliders to update these values in real time without doing a lot of extra work.

UsingFirstPersonCamera

function bool UsingFirstPersonCamera ()

Overrides: PlayerController.UsingFirstPersonCamera

return whether viewing in first person mode

ViewNextBot

function ViewNextBot ()


ViewShake

function ViewShake (float DeltaTime)

Overrides: PlayerController.ViewShake

Sets ShakeOffset and ShakeRot to the current view shake that should be applied to the camera