Zandronum: GameType

From ZDoom Wiki
Jump to navigation Jump to search
SkulltagIcon.png Warning: This feature is Skulltag specific, and is not compatible with ZDoom!
To see all of Skulltag's specific features, see Skulltag features.

int GameType (void)

Usage

Returns the game type currently being played.

Return value

The game type currently being played. For readability there are definitions defined in zdefs.acs as follows:

  • GAME_SINGLE_PLAYER = 0
Solo play.
  • GAME_NET_COOPERATIVE = 1
Cooperative net game.
  • GAME_NET_DEATHMATCH = 2
Deathmatch net game.
  • GAME_TITLE_MAP = 3
Title map
  • GAME_NET_TEAMGAME = 4
Team game net game. This includes CTF, Skulltag, Domination, and the generic "Team Game", but not Team Deathmatch, Team LMS, or Team Possession.

Examples

With this command it is possible to do things such as give an explanation about the map to the player.

script 1 ENTER
{
    if (GameType () != GAME_NET_DEATHMATCH)
        Print (s:"This is a deathmatch only map!");
    else
        Print (s:"BobDM1\nBy Bob");
}