SetCurrentGameMode: Difference between revisions
(Added page for SetCurrentGameMode.) |
DrinkyBird (talk | contribs) (3.1 is released, so Devfeature templates have been removed) |
||
Line 1: | Line 1: | ||
{{ACSWarning}} | {{ACSWarning}} | ||
int '''SetCurrentGameMode''' (str ''gamemode'') | int '''SetCurrentGameMode''' (str ''gamemode'') | ||
==Usage== | ==Usage== |
Revision as of 20:32, 12 December 2021
This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports. |
int SetCurrentGameMode (str gamemode)
Usage
Changes the current game mode, which also resets the game upon success. This requires players to reconnect to the server when it happens. For forwards-compatibility, gamemode is entered as a string and must be one of the following:
- Cooperative
- Survival
- Invasion
- Deathmatch
- Teamplay
- Duel
- Terminator
- LastManStanding
- TeamLMS
- Possession
- TeamPossession
- TeamGame
- CTF
- OneFlagCTF
- Skulltag
- Domination
Return Value
Returns 1 if the game mode was changed, or 0 if it wasn't. There are several reasons why a game mode might not change:
- The new game mode either doesn't exist, or is already being played.
- The current level cannot support the new game mode (e.g. no team starts in a team-based game mode, no deathmatch starts in a deathmatch-based game mode, or no coop starts in a cooperative-based game mode).
- The new game mode is Duel and there's more than two players already in the game.
- The result sequence is currently active. Refer to GetGameModeState.