GetGameModeState: Difference between revisions

From Zandronum Wiki
No edit summary
No edit summary
Tag: Source edit
 
Line 1: Line 1:
{{ACSWarning}}
int '''GetGameModeState''' (void)
int '''GetGameModeState''' (void)


Return values are:
== Usage ==
 
Returns the state of the current [[Game Modes|game mode]].
    GAMESTATE_UNSPECIFIED = -1,
    GAMESTATE_WAITFORPLAYERS = 0,
    GAMESTATE_COUNTDOWN = 1,
    GAMESTATE_INPROGRESS = 2,
    GAMESTATE_INRESULTSEQUENCE = 3.
 
=== GAMESTATE_WAITFORPLAYERS ===
 
In Survival, Invasion, Duel, Last Man Standing and Possession, this result is returned when there are not enough players to start the game.
 
In other non-cooperative gamemodes, this result is returned when there are fewer than two players in the game.
 
In cooperative, this result is returned when there are no players in the game.
 
=== GAMESTATE_COUNTDOWN ===
 
This result is returned the match is in the middle of a before-match countdown.
 
=== GAMESTATE_INPROGRESS ===
 
This result is returned while the match is in progress.
 
=== GAMESTATE_INRESULTSEQUENCE ===


In Survival or Invasion, this result is returned when the "Mission Failed" message has appeared.
=== Return value ===
Possible return values are:


In Duel or Last Man Standing, this result is returned during the victory screen.
* '''GAMESTATE_UNSPECIFIED''' = -1
* '''GAMESTATE_WAITFORPLAYERS''' = 0
: In Survival, Invasion, Duel, Last Man Standing and Possession, this result is returned when there are not enough players to start the game. In other non-cooperative gamemodes, this result is returned when there are fewer than two players in the game. In cooperative, this result is returned when there are no players in the game.
* '''GAMESTATE_COUNTDOWN''' = 1
: Returned during a pre-match countdown.
* '''GAMESTATE_INPROGRESS''' = 2
: Returned when the match is in progress.
* '''GAMESTATE_INRESULTSEQUENCE''' = 3
: In Survival or Invasion, this result is returned when the "Mission Failed" message has appeared. In Duel or Last Man Standing, this result is returned during the victory screen. In all other gamemodes, this result is returned during the delay at the end of the level.


In all other gamemodes, this result is returned during the delay at the end of the level.
== Examples ==
{{noexamples}}


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

Latest revision as of 18:05, 2 July 2022

This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int GetGameModeState (void)

Usage

Returns the state of the current game mode.

Return value

Possible return values are:

  • GAMESTATE_UNSPECIFIED = -1
  • GAMESTATE_WAITFORPLAYERS = 0
In Survival, Invasion, Duel, Last Man Standing and Possession, this result is returned when there are not enough players to start the game. In other non-cooperative gamemodes, this result is returned when there are fewer than two players in the game. In cooperative, this result is returned when there are no players in the game.
  • GAMESTATE_COUNTDOWN = 1
Returned during a pre-match countdown.
  • GAMESTATE_INPROGRESS = 2
Returned when the match is in progress.
  • GAMESTATE_INRESULTSEQUENCE = 3
In Survival or Invasion, this result is returned when the "Mission Failed" message has appeared. In Duel or Last Man Standing, this result is returned during the victory screen. In all other gamemodes, this result is returned during the delay at the end of the level.

Examples

This article lists no examples, please add one.