Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:Check if the given unit is local on the computer in multiplayer games (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 single player all objects are local.

Note: All static objects are local everywhere.

Syntax

Syntax:local object
Parameters:
  • object: Object - Object to check.
Return Value:Boolean

Alternative Syntax

Syntax:local [object, turretPath]
Parameters:
  • object: Object - Object to check.
  • turretPath: Array - Path to the turret.
Return Value:Boolean

Examples

Examples:

if (local _unit) then {hint "unit is local"};

if (local [_vehicle, [0]]) then {hint "turret is local"};

Additional Information

See also: local (Keyword), setLocalityTo, executeWhereLocal
Multiplayer: 
Problems:In multiplayer, remote objects are not initialized in functions called by the Init line or initialization event handlers.

Notes







Posted on August 4, 2006 - 10:56
hardrock
Notes from before the conversion:


In multiplayer, a game logic will always be local to the host computer. This works on both dedicated and player-hosted servers.