This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Bz eGameEndEvent"
From BZFlagWiki
(Updated incorrect information about the event being only a notification) |
|||
Line 6: | Line 6: | ||
==Data== | ==Data== | ||
− | Both '''bz_eGameStartEvent''' and '''bz_eGameEndEvent''' return the ''' | + | 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 16: | Line 16: | ||
|[[Event(API)|bz_eEventType]] | |[[Event(API)|bz_eEventType]] | ||
|bz_eGameStartEvent or bz_eGameEndEvent | |bz_eGameStartEvent or bz_eGameEndEvent | ||
+ | |- | ||
+ | |playerID | ||
+ | |int | ||
+ | |The id of the player who started or ended 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 is set to true if the countdown was ended by a gameover or superkill action. | ||
|- | |- | ||
|eventTime | |eventTime |
Revision as of 08:23, 22 August 2015
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
The bz_eGameEndEvent is an API event that is called each time a game ends. This only triggers when the game countdown ends (A Game Over), or when /superkill is initiated. This is not to be confused with BZFS being shutdown, /shutdown being initiated, or a game ending due to the -g option enabled on servers.
Data
Both bz_eGameStartEvent and bz_eGameEndEvent return the bz_GameStartEndEventData_V2 data class.
name | type | value description |
---|---|---|
eventType | bz_eEventType | bz_eGameStartEvent or bz_eGameEndEvent |
playerID | int | The id of the player who started or ended 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 is set to true if the countdown was ended by a gameover or superkill action. |
eventTime | double | The server time the event occurred (in seconds.) |