UE3:GameInfo instance functions (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
UT3 Object >> Actor >> Info >> GameInfo (instance functions)
GameInfo instance functions in other games:
Other member categories for this class:

Instance functions

AddGameRules

function AddGameRules (class<GameRulesGRClass)


AddInactivePRI

function AddInactivePRI (PlayerReplicationInfo PRI, PlayerController PC)

AddInactivePRI() Add PRI to the inactive list, remove from the active list

AddMutator

function AddMutator (string mutname, optional bool bUserAdded)


AddObjectiveScore

function AddObjectiveScore (PlayerReplicationInfo Scorer, int Score)


AllowCheats

function bool AllowCheats (PlayerController P)


ArbitrationRegistrationComplete

function ArbitrationRegistrationComplete (bool bWasSuccessful)

Empty implementation of the code that handles the callback for completion

AtCapacity

function bool AtCapacity (bool bSpectator)


AttemptReconnect

function AttemptReconnect ()


BeginPlay

function BeginPlay ()


BroadcastDeathMessage

function BroadcastDeathMessage (Controller Killer, Controller Other, class<DamageTypedamageType)


BroadcastTeam

function BroadcastTeam (Controller Sender, coerce string Msg, optional name Type)


CalculatedNetSpeed

function int CalculatedNetSpeed ()


CanLeaveVehicle

function bool CanLeaveVehicle (Vehicle V, Pawn P)


CanSpectate

function bool CanSpectate (PlayerController Viewer, PlayerReplicationInfo ViewTarget)


ChangeName

function ChangeName (Controller Other, coerce string S, bool bNameChange)


ChangeTeam

function bool ChangeTeam (Controller Other, int N, bool bNewTeam)


CheckEndGame

function bool CheckEndGame (PlayerReplicationInfo Winner, string Reason)


CheckModifiedEndGame

function bool CheckModifiedEndGame (PlayerReplicationInfo Winner, string Reason)


CheckRelevance

function bool CheckRelevance (Actor Other)


CheckScore

function bool CheckScore (PlayerReplicationInfo Scorer)


ChoosePlayerStart

function PlayerStart ChoosePlayerStart (Controller Player, optional byte InTeam)

ChoosePlayerStart() Return the 'best' player start for this player to start from. PlayerStarts are rated by RatePlayerStart().

Parameters:

  • Player - is the controller for whom we are choosing a playerstart
  • InTeam - specifies the Player's team (if the player hasn't joined a team yet)

Returns:

NavigationPoint chosen as player start (usually a PlayerStart)

ClearAutoLoginDelegates

function ClearAutoLoginDelegates ()

Clears the login delegates once the login process has passed or failed

ClearPause

function ClearPause ()

Checks the list of delegates to determine if the pausing can be cleared. If the delegate says it's ok to unpause, that delegate is removed from the list and the rest are checked. The game is considered unpaused when the list is empty.

DebugPause

function DebugPause ()

Dumps the pause delegate list to track down who has the game paused

DiscardInventory

function DiscardInventory (Pawn Other, optional Controller Killer)


DriverEnteredVehicle

function DriverEnteredVehicle (Vehicle V, Pawn P)


DriverLeftVehicle

function DriverLeftVehicle (Vehicle V, Pawn P)


EnableAutoReconnect

function EnableAutoReconnect ()


EndGame

function EndGame (PlayerReplicationInfo Winner, string Reason)


FindInactivePRI

function bool FindInactivePRI (PlayerController PC)

FindInactivePRI() returns the PRI associated with this re-entering player

FindPlayerByID

function string FindPlayerByID (int PlayerID)


FindPlayerStart

function NavigationPoint FindPlayerStart (Controller Player, optional byte InTeam, optional string IncomingName)

FindPlayerStart() Return the 'best' player start for this player to start from. PlayerStarts are rated by RatePlayerStart().

Parameters:

  • Player - is the controller for whom we are choosing a playerstart
  • InTeam - specifies the Player's team (if the player hasn't joined a team yet)
  • IncomingName - specifies the tag of a teleporter to use as the Playerstart

Returns:

NavigationPoint chosen as player start (usually a PlayerStart)

GetCoverReplicator

function CoverReplicator GetCoverReplicator ()


GetDefaultPlayerClass

function class<PawnGetDefaultPlayerClass (Controller C)

Returns the default pawn class for the specified controller,

Parameters:

  • C - controller to figure out pawn class for

Returns:

default pawn class

GetNextMap

function string GetNextMap ()

Returns:

the map we should travel to for the next game

GetNumPlayers

function int GetNumPlayers ()


GetServerPort

function int GetServerPort ()


GetTravelType

function bool GetTravelType ()

Returns true if we want to travel_absolute

InitGameReplicationInfo

function InitGameReplicationInfo ()


Kick

function Kick (string S)


KickBan

function KickBan (string S)


Killed

function Killed (Controller Killer, Controller KilledPlayer, Pawn KilledPawn, class<DamageTypedamageType)


Logout

function Logout (Controller Exiting)


MatchIsInProgress

function bool MatchIsInProgress ()


ModifyScoreKill

function ModifyScoreKill (Controller Killer, Controller Other)

For subclasses which don't call GameInfo.ScoreKill()

Mutate

function Mutate (string MutateString, PlayerController Sender)


NotifyArbitratedMatchEnd

function NotifyArbitratedMatchEnd ()

Tells all clients to disconnect and then goes to the menu

NotifyKilled

function NotifyKilled (Controller Killer, Controller Killed, Pawn KilledPawn)


NotifyNavigationChanged

function NotifyNavigationChanged (NavigationPoint N)

notification when a NavigationPoint becomes blocked or unblocked

OnConnectionStatusChange

function OnConnectionStatusChange (OnlineSubsystem.EOnlineServerConnectionStatus ConnectionStatus)

Delegate fired when the online server connection state changes

Parameters:

  • ConnectionStatus - the new connection status

OnDestroyOnlineGameComplete

function OnDestroyOnlineGameComplete (bool bWasSuccessful)


OnLoginChange

function OnLoginChange ()

Used to tell the game when the autologin has completed

OnLoginFailed

function OnLoginFailed (byte LocalUserNum, OnlineSubsystem.EOnlineServerConnectionStatus ErrorCode)

Called if the autologin fails

Parameters:

  • LocalUserNum - the controller number of the associated user
  • ErrorCode - the async error code that occurred

OnServerCreateComplete

function OnServerCreateComplete (bool bWasSuccessful)

Notifies us of the game being registered successfully or not

Parameters:

  • bWasSuccessful - flag telling us whether it worked or not

OnStartOnlineGameComplete

function OnStartOnlineGameComplete (bool bWasSuccessful)

Callback when the start completes

Parameters:

  • bWasSuccessful - true if it worked, false otherwise

OverridePRI

function OverridePRI (PlayerController PC, PlayerReplicationInfo OldPRI)

OverridePRI() override as needed properties of NewPRI with properties from OldPRI which were assigned during the login process

PickFriendTeam

function byte PickFriendTeam (byte Current, Controller C, OnlineSubsystem.UniqueNetId FriendNetId)


PickTeam

function byte PickTeam (byte Current, Controller C)


PickupQuery

function bool PickupQuery (Pawn Other, class<InventoryItemClass, Actor Pickup)

PickupQuery: Called when pawn has a chance to pick Item up (i.e. when the pawn touches a weapon pickup). Should return true if he wants to pick it up, false if he does not want it.

Parameters:

  • Other - the Pawn that wants the item
  • ItemClass - the Inventory class the Pawn can pick up
  • Pickup - the Actor containing that item (this may be a PickupFactory or it may be a DroppedPickup)

Returns:

whether or not the Pickup actor should give its item to Other

PlayerCanRestart

function bool PlayerCanRestart (PlayerController aPlayer)


PlayerCanRestartGame

function bool PlayerCanRestartGame (PlayerController aPlayer)


PreventDeath

function bool PreventDeath (Pawn KilledPawn, Controller Killer, class<DamageTypedamageType, Object.Vector HitLocation)


ProcessClientDataWriteCompletion

function ProcessClientDataWriteCompletion (PlayerController PC)

Removes the specified client from the pending list and tells the game to restart once all clients have notified

Parameters:

  • PC - the player controller that completed the write

ProcessClientRegistrationCompletion

function ProcessClientRegistrationCompletion (PlayerController PC, bool bWasSuccessful)

This is a base (empty) implementation of the completion notification

Parameters:

  • PC - the player controller to mark as done
  • bWasSuccessful - whether the PC was able to register for arbitration or not

ProcessEndGameHandshake

function ProcessEndGameHandshake ()


ProcessServerLogin

function bool ProcessServerLogin ()

Checks for the login parameters being passed on the command line. If present, it does an async login before starting the dedicated server registration process

Returns:

true if the login is in progress, false otherwise

ProcessServerTravel

function ProcessServerTravel (string URL, optional bool bAbsolute)


RatePlayerStart

function float RatePlayerStart (PlayerStart P, byte Team, Controller Player)

RatePlayerStart() Return a score representing how desireable a playerstart is.

Parameters:

  • P - is the playerstart being rated
  • Team - is the team of the player choosing the playerstart
  • Player - is the controller choosing the playerstart

Returns:

playerstart score

RecalculateSkillRating

function RecalculateSkillRating ()

Used by the game type to update the advertised skill for this game

ReduceDamage

function ReduceDamage (out int Damage, Pawn injured, Controller instigatedBy, Object.Vector HitLocation, out Object.Vector Momentum, class<DamageTypeDamageType)


RegisterServer

function RegisterServer ()

Registers the dedicated server with the online service

RegisterServerForArbitration

function RegisterServerForArbitration ()

Empty implementation of the code that registers the server for arbitration

RemoveMutator

function RemoveMutator (Mutator MutatorToRemove)


ReplicateStreamingStatus

function ReplicateStreamingStatus (PlayerController PC)

replicates the current level streaming status to the given PlayerController

RequiresPassword

function bool RequiresPassword ()


ResetLevel

function ResetLevel ()

Resets level by calling Reset() on all actors

ResetLog

function ResetLog ()


RestartGame

function RestartGame ()


RestartPlayer

function RestartPlayer (Controller NewPlayer)


ScoreKill

function ScoreKill (Controller Killer, Controller Other)


ScoreObjective

function ScoreObjective (PlayerReplicationInfo Scorer, int Score)


SendPlayer

function SendPlayer (PlayerController aPlayer, string URL)


ServerWriteArbitrationEndGameData

function ServerWriteArbitrationEndGameData ()

Commits arbitration data for the server and restarts the match

SessionBan

function SessionBan (string S)


SetGameSpeed

function SetGameSpeed (float T)


SetPause

function bool SetPause (PlayerController PC, optional delegate<CanUnpauseCanUnpauseDelegate)

Adds the delegate to the list if the player controller has the right to pause the game. The delegate is called to see if it is ok to unpause the game, e.g. the reason the game was paused has been cleared.

Parameters:

  • PC - the player controller to check for admin privs
  • CanUnpauseDelegate - the delegate to query when checking for unpause

SetPlayerDefaults

function SetPlayerDefaults (Pawn PlayerPawn)


ShouldReset

function bool ShouldReset (Actor ActorToReset)

Returns:

true if ActorToReset should have Reset() called on it while restarting the game, false if the GameInfo will manually reset it or if the actor does not need to be reset

ShouldRespawn

function bool ShouldRespawn (PickupFactory Other)


ShouldSpawnAtStartSpot

function bool ShouldSpawnAtStartSpot (Controller Player)

returns whether the given Controller StartSpot property should be used as the spawn location for its Pawn

SpawnDefaultPawnFor

function Pawn SpawnDefaultPawnFor (Controller NewPlayer, NavigationPoint StartSpot)

Returns a pawn of the default pawn class

Parameters:

  • NewPlayer - Controller for whom this pawn is spawned
  • StartSpot - PlayerStart at which to spawn pawn

Returns:

pawn

StartArbitratedMatch

function StartArbitratedMatch ()

Empty implementation of the code that starts an arbitrated match

StartArbitrationRegistration

function StartArbitrationRegistration ()

Empty implementation of the code that kicks off async registration

StartBots

function StartBots ()


StartHumans

function StartHumans ()


StartMatch

function StartMatch ()


StartOnlineGame

function StartOnlineGame ()

Tells the online system to start the game and waits for the callback. Tells each connected client to register their

TravelFailed

function TravelFailed (string TravelURL, string Error, optional string ErrorCode)

Called from the WorldInfo when travelling fails

UpdateGameplayMuteList

function UpdateGameplayMuteList (PlayerController PC)

Used to notify the game type that it is ok to update a player's gameplay specific muting information now. The playercontroller needs to notify the server when it is possible to do so or the unique net id will be incorrect and the muting not work.

Parameters:

  • PC - the playercontroller that is ready for updates

UpdateGameSettings

function UpdateGameSettings ()

Used to update any changes in game settings that need to be published to players that are searching for games

UpdateGameSettingsCounts

function UpdateGameSettingsCounts ()

Updates the online subsystem's information for player counts so that LAN matches can show the correct player counts

UpdateNetSpeeds

function UpdateNetSpeeds ()


WriteOnlinePlayerScores

function WriteOnlinePlayerScores ()

Overload this method so that your game writes out player scores

WriteOnlineStats

function WriteOnlineStats ()

Overload this method so that your game writes out stats