By Spooner & Mandoble
There are a number of specific terms used in MP scripting for ArmA which are either ambiguous, inconsistent or used differently that in regular (non-ArmA) programming. For example, the use of "global" in terms of an object is quite different to the use of "global" in terms of a variable.
- Client: A machine on which a player is playing, whether it is a single- or multi-player game.
- Dedicated Server: The machine that controls a multi-player game.
- Global object: An object that is owned by one machine, but which can be seen by all machines.
- Global variable: A global variable can be seen by all scripts running on the local machine. Any variable that isn't pre-fixed with an underscore, such as frog, is automatically a global variable. Only global variables may be transmitted via the publicVariable command.
- Join in progress (JIP): In some multi-player games, players can join the game after it has started. When they join, any onPlayerConnected handler will be executed, only on the server, so if the other clients need to be aware of this, you will need to manually communicate this fact.
- Local object (Meaning 1: Local ownership, local visibility): An object that is owned by the machine running the script and which cannot be seen (interacted with) by any any other machine (local _object == true).
- Local object (Meaning 2: Local ownership, global visibility): A global object that is local to the client/server running the script (local _object == true).
- Local variable: A local variable is only visible within a single script execution, which, by its very nature is local to a single machine. All variables pre-fixed with an underscore, such as _frog, are automatically local variables. Only local variables can be declared as private
- Multi-player game (MP): A network game where each player is on a client machine and there is a dedicated server overseeing everything. If you host a multi-player game from within ArmA (arma.exe), then it will create a seperate server for you, so it will act just as if it were a seperate machine. Even if there is only one person playing a game of this type, it is still considered to be a multi-player game.
- Object: Anything that can be placed in the editor or created with createVehicle, createVehicleLocal, createUnit, camCreate or createTrigger.
- "Public" variable: One might call a global variable that has been copied to all machines using publicVariable a "public" variable, but this is misleading and should be avoided. Remember that publicVariable only updates the value of the variable at the moment the publicVariable command is executed; It does not change the nature of the variable in any way, but just broadcasts it and will not cause future changes to be broadcast.
- Private variable: A local variable can be made private through the use of the private command. This limits the visibility of the variable to the current scope, temporarily masking the value of any existing variable of the same name.
- Remote object (Remote ownership, global visibility): A global object which is local to a different machine (local _object == false).
- Server: The machine controlling the game and the player interactions.
- Single-player game (SP): A game run from within ArmA, such as the campaign, where the client and (non-dedicated) server are actually the same machine. This makes scripting considerably simpler, since one does not have to manage communication between machines, as one would in a multi-player game.