local: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(Added a link to Locality in Multiplayer)
Line 18: Line 18:
'''Description:'''
'''Description:'''


'''MP:''' Check if given unit is '''local''' on the computer.
'''MP:''' Check if given unit is '''local''' on the computer. (See [[Locality in Multiplayer]] for general concepts.)


This can be used when some activation fields or scripts need to be performed only on one computer.
This can be used when some activation fields or scripts need to be performed only on one computer.

Revision as of 20:00, 21 July 2006


local obj


Operand types:

obj: Object

Type of returned value:

Boolean

Description:

MP: Check if given unit is local on the computer. (See Locality in Multiplayer for general concepts.)

This can be used when some activation fields or scripts need to be performed only on one computer.

In SP all objects are local.

Note: All static objects are local everywhere.


Example:

local unitName


Comments:

In multiplayer, a game logic will always be local to the host computer.

This works on both dedicated and player-hosted servers.