Cogito, ergo sum

UE3:GameInfo instance functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 05:39, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 2))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Actor >> Info >> GameInfo (instance functions)

Contents

GameInfo instance functions in other games:
RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UT3
Other member categories for this class:
properties

Instance functions[edit]

AddInactivePRI[edit]

function AddInactivePRI (PlayerReplicationInfo PRI, PlayerController PC)

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

AddMutator[edit]

function AddMutator (string mutname, optional bool bUserAdded)


AddObjectiveScore[edit]

function AddObjectiveScore (PlayerReplicationInfo Scorer, int Score)


AllowCheats[edit]

function bool AllowCheats (PlayerController P)


AllowPausing[edit]

function bool AllowPausing (optional PlayerController PC)

Returns:

TRUE if the player is allowed to pause the game.

ArbitrationRegistrationComplete[edit]

function ArbitrationRegistrationComplete (name SessionName, bool bWasSuccessful)

Empty implementation of the code that handles the callback for completion

Parameters:

  • SessionName - the name of the session this is for
  • bWasSuccessful - whether the call worked or not

AtCapacity[edit]

function bool AtCapacity (bool bSpectator)


BroadcastDeathMessage[edit]

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


BroadcastTeam[edit]

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


CalculatedNetSpeed[edit]

function int CalculatedNetSpeed ()


CanLeaveVehicle[edit]

function bool CanLeaveVehicle (Vehicle V, Pawn P)


CanSpectate[edit]

function bool CanSpectate (PlayerController Viewer, PlayerReplicationInfo ViewTarget)


ChangeName[edit]

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


ChangeTeam[edit]

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


CheckEndGame[edit]

function bool CheckEndGame (PlayerReplicationInfo Winner, string Reason)


CheckForSentinelRun[edit]

function bool CheckForSentinelRun ()

Asks AutoTestManager to start a sentinel run if needed

Must be called by gameinfo subclass - not called in base implementation of GameInfo.StartMatch()

Returns:

true if should skip normal startmatch process

CheckModifiedEndGame[edit]

function bool CheckModifiedEndGame (PlayerReplicationInfo Winner, string Reason)


CheckRelevance[edit]

function bool CheckRelevance (Actor Other)


CheckScore[edit]

function bool CheckScore (PlayerReplicationInfo Scorer)


ChoosePlayerStart[edit]

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[edit]

function ClearAutoLoginDelegates ()

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

DebugPause[edit]

function DebugPause ()

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

DiscardInventory[edit]

function DiscardInventory (Pawn Other, optional Controller Killer)


DisplayDebug[edit]

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

Overrides: Actor.DisplayDebug

Use 'ShowGameDebug' console command to show this debug info

Useful to show general debug info not tied to a particular actor physically in the level.

DriverEnteredVehicle[edit]

function DriverEnteredVehicle (Vehicle V, Pawn P)


DriverLeftVehicle[edit]

function DriverLeftVehicle (Vehicle V, Pawn P)


EndGame[edit]

function EndGame (PlayerReplicationInfo Winner, string Reason)


EndLogging[edit]

function EndLogging (string Reason)


EndOnlineGame[edit]

function EndOnlineGame ()

Tells the online system to end the game and tells all clients to do the same

FindInactivePRI[edit]

function bool FindInactivePRI (PlayerController PC)

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

FindPlayerByID[edit]

function string FindPlayerByID (int PlayerID)


FindPlayerStart[edit]

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)

GenericPlayerInitialization[edit]

function GenericPlayerInitialization (Controller C)

handles all player initialization that is shared between the travel methods (i.e. called from both PostLogin() and HandleSeamlessTravelPlayer())

GetCoverReplicator[edit]

function CoverReplicator GetCoverReplicator ()


GetDefaultPlayerClass[edit]

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[edit]

function string GetNextMap ()

Returns:

the map we should travel to for the next game

GetNumPlayers[edit]

function int GetNumPlayers ()


GetServerPort[edit]

function int GetServerPort ()


GetTravelType[edit]

function bool GetTravelType ()

Returns true if we want to travel_absolute

InitGameReplicationInfo[edit]

function InitGameReplicationInfo ()


IsAutomatedPerfTesting[edit]

function bool IsAutomatedPerfTesting ()


IsCheckingForFragmentation[edit]

function bool IsCheckingForFragmentation ()

Returns:

true if checking for fragmentation is enabled

IsCheckingForMemLeaks[edit]

function bool IsCheckingForMemLeaks ()

Returns:

true if checking for memory leaks is enabled

IsDoingASentinelRun[edit]

function bool IsDoingASentinelRun ()

Returns:

true if doing a sentinel run

Kick[edit]

function Kick (string S)


KickBan[edit]

function KickBan (string S)


Killed[edit]

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


Logout[edit]

function Logout (Controller Exiting)


MatchIsInProgress[edit]

function bool MatchIsInProgress ()


ModifyScoreKill[edit]

function ModifyScoreKill (Controller Killer, Controller Other)

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

Mutate[edit]

function Mutate (string MutateString, PlayerController Sender)


NotifyArbitratedMatchEnd[edit]

function NotifyArbitratedMatchEnd ()


NotifyKilled[edit]

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


NotifyNavigationChanged[edit]

function NotifyNavigationChanged (NavigationPoint N)

notification when a NavigationPoint becomes blocked or unblocked

OnLoginChange[edit]

function OnLoginChange (byte LocalUserNum)

Used to tell the game when the autologin has completed

Parameters:

  • LocalUserNum - ignored

OnLoginFailed[edit]

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[edit]

function OnServerCreateComplete (name SessionName, bool bWasSuccessful)

Notifies us of the game being registered successfully or not

Parameters:

  • SessionName - the name of the session that was created
  • bWasSuccessful - flag telling us whether it worked or not

OnStartOnlineGameComplete[edit]

function OnStartOnlineGameComplete (name SessionName, bool bWasSuccessful)

Callback when the start completes

Parameters:

  • SessionName - the name of the session this is for
  • bWasSuccessful - true if it worked, false otherwise

OverridePRI[edit]

function OverridePRI (PlayerController PC, PlayerReplicationInfo OldPRI)

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

PerformEndGameHandling[edit]

function PerformEndGameHandling ()

Does end of game handling for the online layer

PickTeam[edit]

function byte PickTeam (byte Current, Controller C)


PickupQuery[edit]

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[edit]

function bool PlayerCanRestart (PlayerController aPlayer)


PlayerCanRestartGame[edit]

function bool PlayerCanRestartGame (PlayerController aPlayer)


PreventDeath[edit]

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


ProcessClientRegistrationCompletion[edit]

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

ProcessClientTravel[edit]

function PlayerController ProcessClientTravel (out string URL, Object.Guid NextMapGuid, bool bSeamless, bool bAbsolute)

Notifies all clients to travel to the specified URL.

Parameters:

  • URL - a string containing the mapname (or IP address) to travel to, along with option key/value pairs
  • NextMapGuid - the GUID of the server's version of the next map
  • bSeamless - indicates whether the travel should use seamless travel or not.
  • bAbsolute - indicates which type of travel the server will perform (i.e. TRAVEL_Relative or TRAVEL_Absolute)

ProcessServerLogin[edit]

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[edit]

function ProcessServerTravel (string URL, optional bool bAbsolute)


RatePlayerStart[edit]

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[edit]

function RecalculateSkillRating ()

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

ReduceDamage[edit]

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


RegisterServer[edit]

function RegisterServer ()

Registers the dedicated server with the online service

RegisterServerForArbitration[edit]

function RegisterServerForArbitration ()

Empty implementation of the code that registers the server for arbitration

RemoveMutator[edit]

function RemoveMutator (Mutator MutatorToRemove)


ReplicateStreamingStatus[edit]

function ReplicateStreamingStatus (PlayerController PC)

replicates the current level streaming status to the given PlayerController

RequiresPassword[edit]

function bool RequiresPassword ()


ResetLevel[edit]

function ResetLevel ()

Resets level by calling Reset() on all actors

RestartGame[edit]

function RestartGame ()


RestartPlayer[edit]

function RestartPlayer (Controller NewPlayer)


ScoreKill[edit]

function ScoreKill (Controller Killer, Controller Other)


ScoreObjective[edit]

function ScoreObjective (PlayerReplicationInfo Scorer, int Score)


SendPlayer[edit]

function SendPlayer (PlayerController aPlayer, string URL)


SetGameSpeed[edit]

function SetGameSpeed (float T)


SetPause[edit]

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[edit]

function SetPlayerDefaults (Pawn PlayerPawn)


SetSeamlessTravelViewTarget[edit]

function SetSeamlessTravelViewTarget (PlayerController PC)


ShouldAutoContinueToNextRound[edit]

function bool ShouldAutoContinueToNextRound ()

Returns:

true if should auto-continue to next round

ShouldReset[edit]

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[edit]

function bool ShouldRespawn (PickupFactory Other)


ShouldSpawnAtStartSpot[edit]

function bool ShouldSpawnAtStartSpot (Controller Player)

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

SpawnDefaultPawnFor[edit]

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

SpawnPlayerController[edit]

function PlayerController SpawnPlayerController (Object.Vector SpawnLocation, Object.Rotator SpawnRotation)

spawns a PlayerController at the specified location; split out from Login()/HandleSeamlessTravelPlayer() for easier overriding

StartArbitratedMatch[edit]

function StartArbitratedMatch ()

Empty implementation of the code that starts an arbitrated match

StartArbitrationRegistration[edit]

function StartArbitrationRegistration ()

Empty implementation of the code that kicks off async registration

StartBots[edit]

function StartBots ()


StartHumans[edit]

function StartHumans ()


StartMatch[edit]

function StartMatch ()


StartOnlineGame[edit]

function StartOnlineGame ()

Tells the online system to start the game and waits for the callback. Tells each connected client to mark their session as in progress

TellClientsToReturnToPartyHost[edit]

function TellClientsToReturnToPartyHost ()

Iterates the player controllers and tells them to return to their party

TellClientsToTravelToSession[edit]

function TellClientsToTravelToSession (name SessionName, class<OnlineGameSearchSearchClass, byte PlatformSpecificInfo[68])

Iterates the player controllers and tells remote players to travel to the specified session

Parameters:

  • SessionName - the name of the session to register
  • SearchClass - the search that should be populated with the session
  • PlatformSpecificInfo - the binary data to place in the platform specific areas

UnregisterPlayer[edit]

function UnregisterPlayer (PlayerController PC)

Removes the player from the named session when they leave

Parameters:

  • PC - the player controller that just left

UpdateGameplayMuteList[edit]

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[edit]

function UpdateGameSettings ()

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

UpdateGameSettingsCounts[edit]

function UpdateGameSettingsCounts ()

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

UpdateNetSpeeds[edit]

function UpdateNetSpeeds ()


WriteOnlinePlayerScores[edit]

function WriteOnlinePlayerScores ()

If the match is arbitrated, tells all clients to write out their copies of the player scores. If not arbitrated, it only has the first local player write the scores.

WriteOnlineStats[edit]

function WriteOnlineStats ()

Tells all clients to write stats and then handles writing local stats