Locality in Multiplayer: Difference between revisions
mNo edit summary |
(started table) |
||
Line 1: | Line 1: | ||
[[Category: Scripting_Topics ]] | |||
Entities in OFP are handled, in multiplayer, by one computer alone, which sends updates about this entity to other computers connected to the MP game. | Entities in OFP are handled, in multiplayer, by one computer alone, which sends updates about this entity to other computers connected to the MP game. | ||
A unit is said "local" when it is handled by the local computer. | A unit is said "local" when it is handled by the local computer. | ||
Line 24: | Line 26: | ||
A unit can change locality during its lifetime. Typical cases are a player dying (his squad AI units are passed to server), use of a [[join]] command, or units or players entering or exiting vehicles. | A unit can change locality during its lifetime. Typical cases are a player dying (his squad AI units are passed to server), use of a [[join]] command, or units or players entering or exiting vehicles. | ||
== Table of locality == | |||
{{listdev}} | |||
{| border="1" | |||
|- | |||
! style="color: rgb(0, 0, 102);" | Global || style="color: rgb(0, 0, 102);" | Local | |||
|- | |||
| align="center" width=150px height=25| | |||
| align="center" width=150px height=25| | |||
|- | |||
| align="center" width=150px height=25| | |||
| align="center" width=150px height=25| | |||
|- | |||
| align="center" width=150px height=25| | |||
| align="center" width=150px height=25| | |||
|} |
Revision as of 12:26, 24 July 2006
Entities in OFP are handled, in multiplayer, by one computer alone, which sends updates about this entity to other computers connected to the MP game.
A unit is said "local" when it is handled by the local computer.
To know if a unit is local, use the local script command.
Basic Rules
The basic rules to determine locality are as follows:
server = The dedicated server or the client that is hosting the game
client = The computer of a player
- The player's unit is always local to its client
- AI units are always local to the computer of their leader
- AI leaders are always local to the server
- A vehicle is always local to the computer of its driver
Effects of different localities
Knowing locality of a unit is very important as certain command only affect local units (see moveInDriver for example). Other commands have only local effect, nothing will be done outside of computer where the command was issued (see setFog for example).
A unit can change locality during its lifetime. Typical cases are a player dying (his squad AI units are passed to server), use of a join command, or units or players entering or exiting vehicles.
Table of locality
Global | Local |
---|---|