GameType: Difference between revisions

From Zandronum Wiki
(Created page with "int '''GameType''' (void) ==Usage== This function can return one of four values: *'''GAME_SINGLE_PLAYER''' = 0 :Solo play. *'''GAME_NET_COOPERATIVE''' = 1 :Cooperative net g...")
 
No edit summary
Tag: Source edit
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
int '''GameType''' (void)
int '''GameType''' (void)


==Usage==
== Usage ==


This function can return one of four values:
This function can return one of four values:
Line 15: Line 15:
:Team game net game. This includes CTF, Skulltag, Domination, and the generic "Team Game", but not Team Deathmatch, Team LMS, or Team Possession.
:Team game net game. This includes CTF, Skulltag, Domination, and the generic "Team Game", but not Team Deathmatch, Team LMS, or Team Possession.


==Examples==
== Examples ==
 
<syntaxhighlight lang="c">
<pre style="border: 1px dotted; white-space: pre-wrap;">
Script 1 ENTER
script 1 Enter
{
{
  if (GameType() != GAME_SINGLE_PLAYER)
    if (GameType() != GAME_SINGLE_PLAYER)
      Print(s:"This map was not designed for multiplayer!");
        Print(s:"This map was not designed for multiplayer!");
}
}
</pre>
</syntaxhighlight>
 
== See also ==
* {{Zdoomwiki|GameType}}


[[category:ACS Functions]]
[[Category:ACS functions]]

Latest revision as of 16:56, 2 July 2022

int GameType (void)

Usage

This function can return one of four values:

  • 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

Script 1 ENTER
{
    if (GameType() != GAME_SINGLE_PLAYER)
        Print(s:"This map was not designed for multiplayer!");
}

See also