This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz ePlayerDieEvent"

From BZFlagWiki
Jump to: navigation, search
(time to eventTime)
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
==Overview==
 
==Overview==
The '''bz_ePlayerDieEvent''' is an API event that is called each time a player died.
+
The '''bz_ePlayerDieEvent''' is an API event that is called each time a tank is killed.
  
 
==Data==
 
==Data==
'''bz_ePlayerDieEvent''' returns the '''bz_PlayerDieEventData''' data class.
+
'''bz_ePlayerDieEvent''' returns the '''bz_PlayerDieEventData_V1''' data class.
  
 
   {| border="1" cellpadding="20" cellspacing="0"
 
   {| border="1" cellpadding="20" cellspacing="0"
Line 19: Line 19:
 
   |playerID
 
   |playerID
 
   |int
 
   |int
   |ID of the player who died
+
   |ID of the player who was killed.
 
   |-
 
   |-
 
   |team
 
   |team
   |bz_eTeamType
+
   |[[bz_eTeamType]]
   |The team the dying player was a member of
+
   |The team the killed player was on.
 
   |-
 
   |-
 
   |killerID
 
   |killerID
 
   |int
 
   |int
   |The bastard who killed the player
+
   |The owner of the shot that killed the player, or BZ_SERVER for server side kills ( world weapons, superkill, etc..)
 
   |-
 
   |-
 
   |killerTeam
 
   |killerTeam
   |bz_eTeamType
+
   |[[bz_eTeamType]]
   |The team the killer was a member of
+
   |The team the owner of the shot was on.
 
   |-
 
   |-
 
   |flagKilledWith
 
   |flagKilledWith
   |bzApiString
+
   |[[bz_ApiString]]
   |The kind of flag used to kill
+
   |The flag name the owner of the shot had when the shot was fired.
 
   |-
 
   |-
 
   |shotID
 
   |shotID
 
   |int
 
   |int
   |Index of the bullet which hit the player fatally
+
   |The shot ID that killed the player, if the player was not killed by a shot, the id will be -1.
 
   |-
 
   |-
   |pos
+
   |state
   |float[3]
+
   |[[bz_PlayerUpdateState]]
   |Position of the dying player
+
   |The state record for the killed player at the time of the event
 
   |-
 
   |-
   |rot
+
   |eventTime
  |float
+
  |Rotation of the dying player
+
  |-
+
  |time
+
 
   |double
 
   |double
   |Time at which the player was killed
+
   |The server time at which the event occurred (in seconds).
 
   |}
 
   |}
  
 
==Uses==
 
==Uses==
This event is a notification only event, none of the data returned can be changed.
+
This event is a modification event, for example killerID can be changed.
  
 
[[Category:BZFS_API_Docs]]
 
[[Category:BZFS_API_Docs]]
 
[[Category:BZFS_API_Events]]
 
[[Category:BZFS_API_Events]]

Latest revision as of 07:54, 1 May 2014

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.

BZFS Event. This page documents a BZFS event that is called by the game server to notify plug-ins of various actions and state changes in the game world.


Overview[edit]

The bz_ePlayerDieEvent is an API event that is called each time a tank is killed.

Data[edit]

bz_ePlayerDieEvent returns the bz_PlayerDieEventData_V1 data class.

name type value description
eventType bz_eEventType bz_ePlayerDieEvent
playerID int ID of the player who was killed.
team bz_eTeamType The team the killed player was on.
killerID int The owner of the shot that killed the player, or BZ_SERVER for server side kills ( world weapons, superkill, etc..)
killerTeam bz_eTeamType The team the owner of the shot was on.
flagKilledWith bz_ApiString The flag name the owner of the shot had when the shot was fired.
shotID int The shot ID that killed the player, if the player was not killed by a shot, the id will be -1.
state bz_PlayerUpdateState The state record for the killed player at the time of the event
eventTime double The server time at which the event occurred (in seconds).

Uses[edit]

This event is a modification event, for example killerID can be changed.