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

UE3:GameplayEventsWriter (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 11:47, 6 November 2009 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> GameplayEvents >> GameplayEventsWriter
Package: 
Engine
Direct subclass:
UTGameplayEventsWriter

Streams gameplay events recorded during a session to disk

Constants[edit]

See GameplayEventsWriter constants.

Properties[edit]

Game[edit]

Type: GameInfo

Modifiers: const

Reference to the game (set by StartLogging/EndLogging)

Functions[edit]

Native functions[edit]

CloseStatsFile[edit]

native function CloseStatsFile ()

Overrides: GameplayEvents.CloseStatsFile

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

EndLogging[edit]

native function EndLogging ()

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

LogAllPlayerPositionsEvent[edit]

native function LogAllPlayerPositionsEvent (int EventId)

Logs the location of all players when this event occurred

Parameters:

  • EventId - the event being logged

LogDamageEvent[edit]

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

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

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

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

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

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

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

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

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

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

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

native function LogSystemPollEvents ()

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

LogTeamIntEvent[edit]

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

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

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

native protected function bool SerializeFooter ()

Serialize the contents of the file footer

SerializeHeader[edit]

native protected function bool SerializeHeader ()

Serialize the contents of the file header

StartLogging[edit]

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

IsSessionInProgress[edit]

function bool IsSessionInProgress ()

Returns whether or not a logging session has been started

Poll[edit]

function Poll ()

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