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

Difference between revisions of "Bz eGameStartEvent"

From BZFlagWiki
Jump to: navigation, search
(Added event description.)
 
(Overview: improved wording)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
  
 
==Overview==
 
==Overview==
'''bz_eGameStartEvent''' and '''bz_eGameEndEvent''' are API events triggered when a game (i.e., a time- or score-limited match) begins or ends, respectively.
+
The '''bz_eGameStartEvent''' and '''bz_eGameEndEvent''' are API events triggered when a game (i.e., a time- or score-limited match) begins or ends, respectively.
  
 
==Data==
 
==Data==
Both '''bz_eGameStartEvent''' and '''bz_eGameEndEvent''' return the '''bz_GameStartEndEventData_V1''' data class.
+
Both '''bz_eGameStartEvent''' and '''bz_eGameEndEvent''' return the '''bz_GameStartEndEventData_V2''' data class.
  
 
   {| border="1" cellpadding="20" cellspacing="0"
 
   {| border="1" cellpadding="20" cellspacing="0"
Line 15: Line 15:
 
   |eventType     
 
   |eventType     
 
   |[[Event(API)|bz_eEventType]]
 
   |[[Event(API)|bz_eEventType]]
   |bz_eGameStartEvent or bz_eGameEndEvent
+
   |bz_eGameStartEvent or bz_eGameStartEvent
 +
  |-
 +
  |playerID
 +
  |int
 +
  |The id of the player who started the countdown. This will be set to 253 if no player information was given.
 
   |-
 
   |-
 
   |duration
 
   |duration
 
   |double
 
   |double
 
   |The duration (in seconds)  of the game.
 
   |The duration (in seconds)  of the game.
 +
  |-
 +
  |gameOver
 +
  |bool
 +
  |This will always be set to false in [[bz_eGameStartEvent]]
 
   |-
 
   |-
 
   |eventTime
 
   |eventTime

Latest revision as of 01:58, 25 November 2016

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_eGameStartEvent and bz_eGameEndEvent are API events triggered when a game (i.e., a time- or score-limited match) begins or ends, respectively.

Data[edit]

Both bz_eGameStartEvent and bz_eGameEndEvent return the bz_GameStartEndEventData_V2 data class.

name type value description
eventType bz_eEventType bz_eGameStartEvent or bz_eGameStartEvent
playerID int The id of the player who started the countdown. This will be set to 253 if no player information was given.
duration double The duration (in seconds) of the game.
gameOver bool This will always be set to false in bz_eGameStartEvent
eventTime double The server time the event occurred (in seconds.)

Uses[edit]