IsMultiplayer: Difference between revisions

From Zandronum Wiki
(Made new page for IsNetworkGame, replacing the old "IsMultiplayer" page which is no longer valid.)
 
(Renamed the function to IsMultiplayer)
Line 1: Line 1:
{{ACSWarning}}
{{ACSWarning}}
int '''IsNetworkGame''' (void)
int '''IsMultiplayer''' (void)


==Usage==
==Usage==
Line 15: Line 15:
Script 1 Enter
Script 1 Enter
{
{
     if (IsNetworkGame())
     if (IsMultiplayer())
     {
     {
         Print(s: "Isn't multiplayer fun?");
         Print(s: "Isn't multiplayer fun?");

Revision as of 23:12, 5 August 2021

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

int IsMultiplayer (void)

Usage

This function checks if the game is an online game (being emulated by the Multiplayer Console Command does not count). It bears little relationship to the SinglePlayer and {{{2}}} functions, except insofar as those will only report the game as singleplayer if it is offline Cooperative without multiplayer emulation.

Bugs

No known issues, however old ACC builds used to call this PlayerOnTeam.

Examples

Script 1 Enter
{
    if (IsMultiplayer())
    {
        Print(s: "Isn't multiplayer fun?");
    }
}