| Home Page | Recent Changes

GameStats

UT2003 :: Actor >> Info >> GameStats (Package: Engine)

The GameStats object is used to send individual stat events to the stats server. Each game should spawn a GameStats object if it wishes to have stat logging.

Bots and Spectators events,scores, and connects/disconnects are not stored.

Chr(9) is equivalent to a tab character. And is used frequently in this class to space data appropriately.

All events are logged and use the method Header() to give them a formatted TimeStamp to note the time when the event occurred.

Properties

bool bShowBots
Specifies whether stats on the bots should be logged. This property is not used anywhere in UT2003's UnrealScript code.
GameReplicationInfo GRI
An instance of GameReplicationInfo stored in the Level, which is used to gather information for logging purposes.
FileLog TempLog
A log file that is opened as "stats.txt", which is written to by the Logf method throughout the game.

Methods

Inherited From Actor

Destroyed ( )
Shuts down the stats logging.
PostBeginPlay ( )
Initializes the stats logging.

New Methods

ConnectEvent (PlayerReplicationInfo Who)
Logs when a player join the server.
DisconnectEvent (PlayerReplicationInfo Who)
Logs when a player disconnect from the server.
EndGame (string Reason)
Called when the game ends. Loops through the PlayerReplicationInfos to gather their score and deaths.
string FullTimeDate ( )
Returns a string with the date in the format: YEAR-MONTH-DAY HOUR:MINUTE:SECOND
GameEvent (string GEvent, string Desc, PlayerReplicationInfo Who)
Logs special events that take place in game.
string GetMapFileName ( ) [native final]
Returns the name of the current map.
string GetStatsIdentifier (Controller C) [native final]
Returns the players login identifier (see Uniquely Identify A Player).
string Header ( )
Returns the TimeStamp with a tab appended.
Init ( )
Creates the FileLog and opens "Stats.txt" as the log file. If it fails, then the GameStats object is destroyed.
KillEvent (string Killtype, PlayerReplicationInfo Killer, PlayerReplicationInfo Victim, class<DamageType> Damage)
Logs a kill with the time, who did the killing (even environment), who was killed, and by the damage type they were killed by.
Logf (string LogString)
Writes to the "Stats.txt" file through the FileLog that was created during the init method.
string MapName ( )
Gets the mapname from the native function GetMapFileName and then strips off the extension ".ut2" and removes any tab characters.
NewGame ( )
Logs the Level Title, Level Author, Level GameName, Server Time, Server Time Zone, MapName, and all the Mutator and GameRules objects that are loaded.
ScoreEvent (PlayerReplicationInfo Who, float Points, string Desc)
Logs the timestamp, player name, points scored, and the description of the score.
ServerInfo ( )
Logs the Server Name, Time Zone, Admin Email, Admin Name, IP:port (filled by MasterServer), and stores all the key/value pairs of the ServerState.
Shutdown ( )
Closes the FileLog.
SpecialEvent (PlayerReplicationInfo Who, string Desc)
Logs the time and the special event caused by a player.
StartGame ( )
Logs the time and the initials for the start of the game.
TeamScoreEvent (int Team, float Points, string Desc)
Logs the time, the team number, points scored, and the description of the scoring.
string TimeStamp ( )
Returns a string with the time on the level rounded to the nearest second.
String TimeZone ( )
Currently returns 0, has a comment that this needs to be fixed.

Known Subclases


Category Class (UT2003)

Category Class (UT2004)

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In