The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:GameplayEventsWriter (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> GameplayEvents >> GameplayEventsWriter
Package: 
Engine
Direct subclass:
UTGameplayEventsWriter

Streams gameplay events recorded during a session to disk

Constants

See GameplayEventsWriter constants.

Properties

Game

Type: GameInfo

Modifiers: const

Reference to the game (set by StartLogging/EndLogging)

Functions

Native functions

CloseStatsFile

native function CloseStatsFile ()

Overrides: GameplayEvents.CloseStatsFile

Closes and deletes the archive that was being written to clearing all data stored within

EndLogging

native function EndLogging ()

Mark the end of a logging session closes file, stops polling, etc

LogAllPlayerPositionsEvent

native function LogAllPlayerPositionsEvent (int EventId)

Logs the location of all players when this event occurred

Parameters:

  • EventId - the event being logged

LogDamageEvent

native function LogDamageEvent (int EventId, Controller Player, class<DamageTypeDmgType, Controller Target, int Amount)

Logs damage with the amount that was done and to whom it was done

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • DmgType - the damage type that was done
  • Target - the player being damaged
  • Amount - the amount of damage done

LogGameIntEvent

native function LogGameIntEvent (int EventId, int Value)

Logs an int base game event

Parameters:

  • EventId - the event being logged
  • Value - the value associated with the event

LogGameStringEvent

native function LogGameStringEvent (int EventId, string Value)

Logs a string based game event

Parameters:

  • EventId - the event being logged
  • Value - the value associated with the event

LogPlayerFloatEvent

native function LogPlayerFloatEvent (int EventId, Controller Player, float Value)

Logs an event with an float value associated with it

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • Value - the value for this event

LogPlayerIntEvent

native function LogPlayerIntEvent (int EventId, Controller Player, int Value)

Logs an event with an integer value associated with it

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • Value - the value for this event

LogPlayerKillDeath

native function LogPlayerKillDeath (int EventId, int KillType, Controller Killer, class<DamageTypeDmgType, Controller Dead)

Logs a player killing and a player being killed

Parameters:

  • EventId - the event that should be written
  • KillType - the additional information about a kill
  • Killer - the player that did the killing
  • DmgType - the damage type that was done
  • Dead - the player that was killed

LogPlayerLoginChange

native function LogPlayerLoginChange (int EventId, Controller Player, string PlayerName, OnlineSubsystem.UniqueNetId PlayerId, bool bSplitScreen)

Logs when a player leaves/joins a session

Parameters:

  • EventId - the login/logout event for the player
  • Player - the player that joined/left
  • PlayerName - the name of the player in question
  • PlayerId - the net id of the player in question
  • bSplitScreen - whether the player is on splitscreen

LogPlayerPlayerEvent

native function LogPlayerPlayerEvent (int EventId, Controller Player, Controller Target)

Logs a player to player event

Parameters:

  • EventId - the event that should be written
  • Player - the player that triggered the event
  • Target - the player that was the recipient

LogPlayerSpawnEvent

native function LogPlayerSpawnEvent (int EventId, Controller Player, class<PawnPawnClass, int TeamID)

Logs a spawn event for a player (team, class, etc)

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • PawnClass - the pawn this player spawned with
  • Team - the team the player is on

LogPlayerStringEvent

native function LogPlayerStringEvent (int EventId, Controller Player, string EventString)

Logs an event with an string value associated with it

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • EventString - the value for this event

LogProjectileIntEvent

native function LogProjectileIntEvent (int EventId, Controller Player, class<ProjectileProj, int Value)

Logs a projectile event with an integer value associated with it

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • Proj - the projectile class associated with the event
  • Value - the value for this event

LogSystemPollEvents

native function LogSystemPollEvents ()

Log various system properties like memory usage, network usage, etc.

LogTeamIntEvent

native function LogTeamIntEvent (int EventId, TeamInfo Team, int Value)

Logs a team event

Parameters:

  • EventId - the event being logged
  • TeamIndex - the team associated with this event
  • Value - the value associated with the event

LogWeaponIntEvent

native function LogWeaponIntEvent (int EventId, Controller Player, class<WeaponWeaponClass, int Value)

Logs a weapon event with an integer value associated with it

Parameters:

  • EventId - the event being logged
  • Player - the player that triggered the event
  • WeaponClass - the weapon class associated with the event
  • Value - the value for this event

OpenStatsFile

native function bool OpenStatsFile (string Filename)

Overrides: GameplayEvents.OpenStatsFile

Creates the archive that we are going to write to

Parameters:

  • Filename - name of the file that will be open for serialization

Returns:

TRUE if successful, else FALSE

SerializeFooter

native protected function bool SerializeFooter ()

Serialize the contents of the file footer

SerializeHeader

native protected function bool SerializeHeader ()

Serialize the contents of the file header

StartLogging

native function StartLogging (optional float HeartbeatDelta)

Mark a new session, clear existing events, etc

Parameters:

  • Delta - polling frequency (0 turns it off)

Other instance functions

IsSessionInProgress

function bool IsSessionInProgress ()

Returns whether or not a logging session has been started

Poll

function Poll ()

Heartbeat function to record various stats (player location, etc)