Engine.game¶
The state of the game and the current match.
Functions¶
Engine.game.getTickCount¶
local ticks = Engine.game.getTickCount()
Returns the current game time, in ticks. There are 30 ticks per second.
Engine.game.getGameEngineType¶
local type = Engine.game.getGameEngineType()
Returns the game type of the current multiplayer match: "slayer", "ctf", "oddball",
"king", "race" or "none", or nil when no game type is active.
Engine.game.getGameConnectionType¶
local connection = Engine.game.getGameConnectionType()
Returns the role of this game in the current session:
| Value | Meaning |
|---|---|
"local" |
Campaign, or a multiplayer game that is not networked. |
"networkClient" |
Connected to a server. |
"networkServer" |
Hosting a game. |
"filmPlayback" |
Playing a saved film. |
Engine.game.isTeamGame¶
local isTeam = Engine.game.isTeamGame()
Returns whether the current multiplayer game is played in teams. Outside a multiplayer game the value is meaningless.