Dictionary; Player - HWRM/KarosGraveyard GitHub Wiki

💡 This definition is pulled from a larger tutorial.

In the scripts, we only talk about a player's index, which is a number type.

Players are a predefined list, as set out in the .level file (although not all of the available player slots need be filled).

Player 0 will always be 'Player One', i.e

  • the human player during campaign missions
  • the host of a multiplayer game

Just as with sobgroups, you can only interact with players indirectly using their player index (or player id).

Player_GrantAllResearch(0); -- grants all unrestricted research items to player 0

Unlike sobgroups, there is no way to manually create or destroy players. Killing all a player's ships with Player_Kill will destroy that player's ships, but you can easily spawn in more for them after this.

There are eight possible players:

  • player -1; you can assign ships to player -1 in the .level; this is especially useful when trying to add 'neutral' ships to a multiplayer map
  • players 0 through 7, which are the standard human/CPU players
    • player 0 is always the human player (or the host of a multiplayer game)