Multimode: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Fox (talk | contribs)
No edit summary
Fox (talk | contribs)
No edit summary
Line 1: Line 1:
This store the number of players in the game.
Returns the number of players in the game.
 
In singleplayer, it is set to 1.
In singleplayer, it is set to 1.


'''multimode''' stores the total of player in the game, while [[numplayers]] stores only non-bot players.
The player IDs range from zero to '''MULTIMODE''' minus 1.
 
In the original Duke Nukem 3D, once a player quit, '''MULTIMODE''' would decrease permanently, meaning it was impossible for a new player to join mid-game.


It can also be used for when making a loop through all players. Example:
It can also be used for when making a loop through all players. Example:
Line 12: Line 15:
   }
   }
  endevent
  endevent
While '''MULTIMODE''' stores the total of player in the game, [[numplayers]] stores only non-bot players.


[[Category:Userdef structure members]]
[[Category:Userdef structure members]]

Revision as of 05:22, 19 February 2020

Returns the number of players in the game.

In singleplayer, it is set to 1.

The player IDs range from zero to MULTIMODE minus 1.

In the original Duke Nukem 3D, once a player quit, MULTIMODE would decrease permanently, meaning it was impossible for a new player to join mid-game.

It can also be used for when making a loop through all players. Example:

appendevent EVENT_WORLD
  for My_Player range MULTIMODE
  {
    [...]
  }
endevent

While MULTIMODE stores the total of player in the game, numplayers stores only non-bot players.